How it works · Messaging

Publish an event; let the subscribers decide

A service publishes through one interface and does not know who listens. On the other side a topic becomes a Chenile event, and every subscribed operation runs through the same pipeline as an HTTP call. The broker is a jar on the classpath.

Messaging: one publish, any transport, every subscriber through the pipeline A service publishes through the ChenilePub interface, either an event or a call to another service's operation. Kafka carries it here; MQTT, Azure Event Hubs and an in-JVM transport implement the same interface. On the receiving deployable a listener maps the topic to a Chenile event, and EventProcessor runs every subscribed operation through the full pipeline; an operation topic reaches exactly one operation through PubSubEntryPoint. A variant shows a failing subscriber: three retries, then the dead-letter topic. order deployable OrderServiceImplpublishes after saving ChenilePubKafkaPublisher Kafka topic orderPlaced topic chenile_global_service header chenile-topic topic orderPlaced.DLT MQTT · Azure Event Hubs · in-JVM inventory deployable Kafka listenertopic → event binding EventProcessorone exchange per subscriber dead-letter topicafter 1 s × 3 retries inventoryService.reservepipeline → service notificationService.notifypipeline → service the publisher does not know who listens; subscribers run the full pipeline
route
scenario
view
Step 1

Exchange

Payload

The broker is a dependency

Kafka, MQTT, Azure Event Hubs and an in-memory transport implement the same ChenilePub interface. Moving from the cloud to the edge or to a test changes a module, not the code.

A message is a request

A subscribed operation is an ordinary operation: tenant from the headers, typed body, every interceptor. One method serves HTTP and messages.

Bad messages step aside

A failing message is retried, then parked on a dead-letter topic so the partition keeps moving. Delivery is at least once, so subscribers should be idempotent.