On Fri, May 13, 2016 at 9:44 AM, siddutta <siddhartha_du...@live.com> wrote:

> I wish to run an experiment in which the publisher loses connection with
> the
> broker and then enqueues them in its own queue and then when it regains
> connectivity it send s all its queued messages to the broker. How can I I
> do
> this since if I call close connection, I can no longer send(raises an
> exception). A trick that I can think of is to use a network of two brokers
> and simulate the above by breaking the connection between the two brokers.
> Is there an API call that I can use to do the above?
>

You could try sending a SIGSTOP signal to the broker process, wait for a
while, and then send it a SIGCONT. If the broker is running in a terminal,
you can do Ctrl+z to pause it and then fg to resume it. If you do this,
connection stays open, but broker stops responding. I believe that from the
point of view of the publisher, this is indistinguishable from a network
failure between the publisher and the router.
 --
Jiří Daněk

Reply via email to