I want to publish data to Aeron even if there are no subscribers. I start media driver with a flag 'spiesSimulateConnection(true)'. Then I create a publication like this:
if (isRecorded) {
publication = archive.addRecordedExclusivePublication(channel, streamId);
} else {
publication = archive.context()
.aeron()
.addExclusivePublication(channel, streamId);
}
If publication is recorded, then everything goes well. I understand that Aeron Archive creates a spy subscription, so the publication knows that someone is listening. If a publication is not recorded, then publication.offer
returns Publication.NOT_CONNECTED
. Is there a way to avoid errors here? Can I tell Aeron to create a spy subscription which discards data?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744928847a4601609.html
评论列表(0条)