EventMesh(incubating) is a dynamic cloud-native eventing infrastructure.
CloudEvents is a specification for describing event data in common formats to provide interoperability across services, platforms and systems.
As of May 2021, EventMesh contains the following major components: eventmesh-runtime
, eventmesh-sdk-java
and eventmesh-connector-rocketmq
. For a customer to use EventMesh, eventmesh-runtime
can be deployed as microservices to transmit customer‘s events between event producers and consumers. Customer’s applications can then interact with eventmesh-runtime
using eventmesh-sdk-java
to publish/subscribe for events on given topics.
CloudEvents support has been a highly desired feature by EventMesh users. There are many reasons for users to prefer using a SDK with CloudEvents support:
eventmesh-sdk-java
currently uses the LiteMessage
structure to describe events, which is less standardized.Requirement ID | Requirement Description | Comments |
---|---|---|
F-1 | EventMesh users should be able to depend on a public SDK to publish/subscribe events in CloudEvents format | Functionality |
F-2 | EventMesh users should continue to have access to existing EventMesh client features (e.g. load balancing) with an SDK that supports CloudEvent | Feature Parity |
F-3 | EventMesh developers should be able to sync eventmesh-sdk-java and an SDK with CloudEvents support without much effort/pain | Maintainability |
F-4 | EventMesh support pluggable protocols for developers integrate other protocols (e.g. CloudEvents\EventMesh Message\OpenMessage\MQTT ...) | Functionality |
F-5 | EventMesh support the unified api for publish/subscribe events to/from event store | Functionality |
Requirement ID | Requirement Description | Comments |
---|---|---|
P-1 | Client side latency for SDK with CloudEvents support should be similar to current SDK |
Binding with the CloudEvents Java SDK (similar to what Kafka already did, see Reference for more details) should be an easy way to achieve the requirements.
package
headerCloudEventBuilder
build the CloudEvent and put it into the package
bodyconvert
function under the ReceiveMsgHook
interface, for converting the package
body to the specific protocol with the identifier in package
headerReceiveMsgHook
interfacedecodeMessage
interface which convert the package's body to CloudEventSession.upstreamMsg()
in MessageTransferTask
change the input parameter Message to CloudEvent, the CloudEvent use the last step decodeMessage
api convertSessionSender.send()
change the input parameter Message
to CloudEvent
MeshMQProducer
api support send CloudEvents
in runtimeconnector-plugin
for send CloudEvents
to EventStoresupport change the RocketMessage
to CloudEvent
in connector-plugin
overwrite the AsyncMessageListener.consume()
function, change the input parameter Message
to CloudEvent
update the MeshMQPushConsumer.updateOffset()
implementation change the the input parameter Message
to CloudEvent
update DownStreamMsgContext
, change the input parameter Message
to CloudEvent
, update the DownStreamMsgContext.ackMsg
LiteProducer.publish(cloudEvent)
HttpCommand.body
by pluggable protocol plugins according the protocol type in HttpCommand
headerupdate the EventMeshConsumer.subscribe()
update HandleMsgContext
, change the input parameter Message
to CloudEvent
update AsyncHttpPushRequest.tryHTTPRequest()