Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeToLive, priority, delay features to producer. #1

Merged
merged 4 commits into from Aug 2, 2017

Conversation

makasim
Copy link
Member

@makasim makasim commented Jul 24, 2017

Copy link

@pinepain pinepain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

what's is the plan to handle cases with non fully compatible JMS/queue-interop brokers?

*
* @param float|int $deliveryDelay - the delivery delay in milliseconds.
*/
public function setDeliveryDelay($deliveryDelay);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it's a part of JMS, it may not be implementable for some brokers, e.g. RabbitMQ (in default setup) or may require specific broker settings (RabbitMQ will need https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/ plugin to support message dealayed delivery)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the transport does not support it will throw an exception.

JMS does not tell anything on what transport should do in this case (when it does not support a feature)

*
* @param int $priority
*/
public function setPriority($priority);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While in JMS spec 3.4.10 JMSPriority it says

JMS does not require that a provider strictly implement priority ordering of
messages; however, it should do its best to deliver expedited messages ahead
of normal messages.

is there a list of implementation that potentially may support this feature?

*
* @param int|float $timeToLive the message time to live to be used, in milliseconds; a value of zero means that a message never expires.
*/
public function setTimeToLive($timeToLive);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JFYI: in RabbitMQ if message with ttl get to queue with ttl, the lower ttl of two will be chosen.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeap, there is nothing we can do with it.

@makasim makasim merged commit 7130cf1 into master Aug 2, 2017
@makasim makasim deleted the producer-impr branch August 2, 2017 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants