aymdev / messengerazurebundle Goto Github PK
View Code? Open in Web Editor NEWA Symfony 4/5/6 bundle providing a Messenger transport for Azure Service Bus using the Azure REST API.
License: MIT License
A Symfony 4/5/6 bundle providing a Messenger transport for Azure Service Bus using the Azure REST API.
License: MIT License
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."
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.
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
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
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.
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 :
I prefer the first option because it is relying more on messenger workflow.
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!
PHP 7.3 is no longer maintained and there is no downloads for this PHP version.
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 :
/
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 :)
Hey!
I think this urldecode is creating a small problem here.
Azure Keys often will come with values like "+" inside of them which will end up replacing "+" with " " (empty space).
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.
Some deprecations appear in the 3 workflows:
set-output
command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/save-state
command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.