Daniel Orner

Results 115 comments of Daniel Orner

Just found this myself today as well. There was an issue already raised and closed for this here: https://github.com/nvie/gitflow/issues/100 but I agree that it does not match with the development...

Excited for this - it's been bothering me for a while!

For producers, by default they are only opened/closed when you produce: ```ruby def publish_list(messages) producer = sync_producer || create_sync_producer produce_messages(producer, messages) producer.deliver_messages ensure producer&.shutdown unless Phobos.config.producer_hash[:persistent_connections] end ``` If you...

One option is for you to define your producer classes outside the listener, e.g. in an initializer (if you're running Rails), a railtie, etc. This means your consumers would share...

Ah - just realized Phobos has a `boot` option that lets you define some code to run before the threading happens. So you could define it there.

You first need to actually create the producer before starting up the listeners. So it's not enough to put in the at_exit block, you actually have to initialize the producer...

Hmm... now that I'm looking at it I think you're right. It would be stored in thread variables and sharing the object reference wouldn't share the producer. I'm not sure...

Yeah I don't know of any ramifications of not closing the producer. I think you're right, the broker should kill the extra one after some time. `connections.max.idle.ms` is the setting.

The main reason was when using Phobos as a consumer. We need to be able to abort on exception or we don't have a good way to safely exit when...

Yep, that could definitely work! Can you submit a PR with the fix?