Package com.sap.cds.services.messaging
Interface MessagingService
- All Superinterfaces:
Service
Messaging service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the compositeMessagingServicestatic final StringThe messaging error event, that allows to handle acknowledgement of a message on the messaging channel -
Method Summary
Modifier and TypeMethodDescriptionvoidThe message Map is interpreted as data map and passed toemit(String, Map, Map).voidTakes a (cloudevents) message, separated into data and headers and sends it to the specified topic of this message broker.
-
Field Details
-
COMPOSITE_NAME
The name of the compositeMessagingService- See Also:
-
EVENT_MESSAGING_ERROR
The messaging error event, that allows to handle acknowledgement of a message on the messaging channel- See Also:
-
-
Method Details
-
emit
The message Map is interpreted as data map and passed toemit(String, Map, Map). Usually this results in a final message like: {data: message}- Parameters:
topic- the topicmessage- the Map to be serialized to JSON and then sent
-
emit
Takes a (cloudevents) message, separated into data and headers and sends it to the specified topic of this message broker.Usually data and headers are combined into a final JSON string message following the rule: {...headers, data: data}. Brokers (e.g. Kafka) that natively support headers might separate headers from data
- Parameters:
topic- the topicdata- the data Mapheaders- the headers Map
-