You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Michael Ivanov <iv...@logit-ag.de> on 2015/08/04 19:24:07 UTC

Proton messangers after fork

Greetings,

I have a process that receives amqp messages using proton messenger in passive mode
(inside select-based event loop) and sends replies back using second messenger in
non-passive mode. I want to handle certain messages in a separate process instance.
Normally I would just fork current process and do all necessary job in a child,
but I have certain doubts about messenger connections. Should I just close corresponding
file descriptors and free the messengers? Will this also affect messenger connections
in parent? Will it be safe if I will just create a new messenger in a child
(most probably in non-passive blocking mode) to send back reply messages?
I am concerned about any possible implicit proton initializations: should I somehow
re-initialize the library in child?

Or is it more safe just to exec a different process in this case?

Many thanks,
-- 
 \   / |			           |
 (OvO) |  Mikhail Iwanow                   |
 (^^^) |      Voice:   +7 (911) 223-1300   |
  \^/  |      E-mail:  ivans@logit-ag.de   |
  ^ ^  |                                   |

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org