Class DefaultPublisher
java.lang.Object
com.iohao.net.common.DefaultPublisher
- All Implemented Interfaces:
Publisher
Default single-threaded
Publisher implementation backed by per-publication queues.
Messages are queued by publication name and encoded on the publisher thread before being offered to Aeron.
- Since:
- 25.1
- Author:
- 渔民小镇
- date:
- 2025-09-27
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPublication(String name, io.aeron.Publication publication) Adds a named Aeron publication target.voidpublishMessage(String name, Object message) Enqueues a message for publication.voidshutdown()Stops background publishing resources.voidstartup()Starts background publishing resources.
-
Constructor Details
-
DefaultPublisher
public DefaultPublisher()
-
-
Method Details
-
addPublication
Description copied from interface:PublisherAdds a named Aeron publication target.- Specified by:
addPublicationin interfacePublisher- Parameters:
name- publication namepublication- Aeron publication
-
publishMessage
Description copied from interface:PublisherEnqueues a message for publication.- Specified by:
publishMessagein interfacePublisher- Parameters:
name- publication namemessage- message to publish
-
startup
-
shutdown
-