Class EsbRealtimeBus
java.lang.Object
com.kingsrook.qqq.esb.realtime.EsbRealtimeBus
- All Implemented Interfaces:
RealtimeBusInterface,AutoCloseable
Non-durable, non-shared topic fan-out using the ESB provider connection manager.
-
Constructor Summary
ConstructorsConstructorDescriptionCode-reference constructor, initialized with the owning instance in context.EsbRealtimeBus(QInstance instance) Resolve a declared topic, or the default topic on a single configured provider. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Interrupt setup before taking its lock; the owner retains provider connections.booleanReadiness is also useful for hosts starting an HTTP server after the bus.voidpublish(RealtimeMessage message) Use a non-transacted, auto-ack session like the control topic.subscribe(Consumer<RealtimeMessage> listener) Subscribe locally; the broker sends each message to every pod, including its producer.
-
Constructor Details
-
EsbRealtimeBus
public EsbRealtimeBus()Code-reference constructor, initialized with the owning instance in context. -
EsbRealtimeBus
Resolve a declared topic, or the default topic on a single configured provider.
-
-
Method Details
-
publish
Use a non-transacted, auto-ack session like the control topic. Never fail a caller.- Specified by:
publishin interfaceRealtimeBusInterface
-
subscribe
Subscribe locally; the broker sends each message to every pod, including its producer.- Specified by:
subscribein interfaceRealtimeBusInterface
-
isListening
public boolean isListening()Readiness is also useful for hosts starting an HTTP server after the bus. -
close
public void close()Interrupt setup before taking its lock; the owner retains provider connections.- Specified by:
closein interfaceAutoCloseable
-