Enable "tracing" of callbacks, without any requirements to callback itself, or rewriting commands etc. #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request to enable "tracing" of callbacks, without any requirements to callback itself, or rewriting commands etc.
Interface Kdyby\RabbitMq\IConsumerStartListener introduced
Every registered service implementign this interface will be registered to Consumer::onStart event. Service then can lregister any other event. Another approach needs to use Kdyby\Events (in some projects for this only purpose), or there would be requirements to "callback" classes.
onConsume append queueName and callback
Mostly for MultipleConsumer, there were introduced 3rd and 4th argument to onConsume event. 3rd = queueName (string), 4th = callback (callable).
Both of this allow you to "monitor" callback efficiency "externaly" without need to rewrite commands, or without need to make common parents for callback classes etc.
Commit 9841164
Fixed issue #40
Commit bbd98ba
As for memory, allowed to set time limit for consumer. It's usable for dirty apps, for example with MultipleConsumer, where can increase number of opened resources, which should be freed sometimes. When application doesn't do freeing in code, its good to be able "restart" it in predefined intervals to do this wrong way. (Restart = self-suicide and restart by supervisord. When parameter- t were introduced, you can now do this whole in supervisor config)