Git Product home page Git Product logo

messengerazurebundle's People

Contributors

aymdev avatar hug-socloz avatar pepamartinec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

messengerazurebundle's Issues

SessionID attributes should be SessionId

We can use session enabled queues by using "Forward messages to". But the SessionID should be SessionId

The message is not forward and goes directly to dead-letter with the error : "The SessionId was not set on a message, and it cannot be sent to the entity. Entities that have session support enabled can only receive messages that have the SessionId set to a valid value."

Argument #12 ($timeToLive) must be of type ?int, float given in AzureBrokerPropertiesStamp::__construct()

Description:
While utilizing the package, I encountered an error related to type incompatibility within the constructor of AzureBrokerPropertiesStamp. The error message is:

"AymDev\MessengerAzureBundle\Messenger\Stamp\AzureBrokerPropertiesStamp::__construct(): Argument #12 ($timeToLive) must be of type ?int, float given, called in /var/app/vendor/aymdev/messenger-azure-bundle/src/Messenger/Stamp/AzureBrokerPropertiesStamp.php on line 160

The method expects $timeToLive to be either null or int, but a float value is being passed in when message is received from queue.

Steps to Reproduce:

1. Configure the `messenger.yaml` as instructions says.
2. Send message to queue from Azure portal.

Expected Behavior:
The constructor should handle the provided value without a type error.

Possible Solution:
Consider rounding the value to an integer before setting it to the class property $timeToLive or re-evaluating the method's signature and class property to accept float values.

Max delivery count and dead-lettering

Context

In order to use the dead-lettering feature after Max delivery count. We want the message to stay on the queue with the lock. So the lock will expire. And the then the message could be retry.

Then the goal is to use Max delivery count, and Message lock duration for peek-lock

Messenger workflow

In error case :
1 -> messenger call 'reject' method on transport - (the stamp RedeliveryStamp is added) -> the message is deleted
2 -> messenger call 'send' method on transport to recreate the message

How to do

First option

Add a bundle option called for example : keep-locked-on-error: true (used only with peek-lock)
When a message is 'reject' and/or 'send' then check if RedeliveryStamp exists and keep-locked-on-error is true to prevent deletion and avoid re-send.

Second option

Implement a middleware which catch errors. When there is an error the middleware catch it and can add a custom stamp for example KeepLockedStamp.

But now we have 2 options :

  • rethrow error -> its matches the "First option" and do not 'reject' and/or 'send' when the KeepLockedStamp is set.
  • continue -> then 'ack' is called, check if KeepLockedStamp is set and do not delete.

I prefer the first option because it is relying more on messenger workflow.

Add support for `DelayStamp` to the AzureTransport class to delay message retries after failures.

Symfony Messenger allows to configure the time delay in milliseconds after which a failed message can be retried.

https://symfony.com/doc/current/messenger.html#retries-failures

Scrolling through the AzureTransport class, I can see it sends a message as soon as it's passed to send(Envelope $envelope). So even though Symfony adds the DelayStamp to the Envelope after it fails, the AzureTransport ignores it completely.

Is there a way to add support for this?
What could be a viable workaround meanwhile?

Thanks!

Drop PHP 7.3 support

PHP 7.3 is no longer maintained and there is no downloads for this PHP version.

  • drop support for PHP 7.3
  • check for optimizations in the repository (null coalescing assignment operator, typed properties, ...)

V1.5.0 Breaking Change - parse_url() error with unescaped secret key

Hi !

Since the last release (1.5.0) I encounter the following exception :

"Invalid Azure Service Bus DSN ..."

After a quick look, I noticed the parse_url function is now used to parse the DSN url.

Problem is : I have some unescaped characters in my secret key (especially a / character that breaks everything).

So came a few questions :

  • Can this be considered as a breaking change ? If so, a major version with this info in the release note would be better IMHO.
  • Am I supposed to have this kind of unescaped characters in my secret key ?
  • And, if I do escape it, the key won't be valid anymore to the azure service bus, right ? / character becoming %2F with urlencode for instance.

Maybe I am missing some good practice about formatting my secret key, in this case please tell me !

EDIT:
I just saw there is a call to url_decode at some point, so it should decode the secret key correctly, but the other questions still stands :)

Base Endpoint has fixed scheme and domain

It would be great if this could support the use of azurite in a docker container. It doesn't feel like it's far away but the getBaseEndpoint has fixed portions which means you can't fully control the request URL with config so there's no way of hitting your local azurite instance.

Fix GitHub Actions deprecations

Some deprecations appear in the 3 workflows:

CustomProperties

Hi I have a question in relation to send message to service Bus.

When I Send some message I saw that it's posible to add BrokerProperties in the dispatch, But, there is posible to send CustomProperties?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.