wutzebaer
wutzebaer

Reputation: 14875

Send message to jgroups channel without joining

Sometimes i need to send a message to a channel, i don't care if the channel has any members and the message gets lost.

Is it possible to send a message to a channel without joining it?

Upvotes: 0

Views: 233

Answers (1)

Bela Ban
Bela Ban

Reputation: 2186

You could use a stack that has only UDP (and perhaps UNICAST3) in it, but you'd still have to join it. Or you could mark the message as NO_FC | NO_RELIABILITY and that would skip retransmission and lossless protocols such as NAKACK2 and UNICAST3. However, you'd still have to join.

A way to send a message to a cluster without joining it (e.g. creating a channel and connecting it) is to make every channel listen for external communication, e.g. via a TCP socket. The STOMP protocol [1] is an example of such a protocol, but of course any type of communication (REST, binary etc) would work. In this case, however, the messages reveived over a STOMP socket are sent with whatever properties the cluster channel has.

[1] http://www.jgroups.org/manual4/index.html#STOMP

Upvotes: 1

Related Questions