service-bus | PHP Lightweight Message Bus supporting CQRS | Microservice library
kandi X-RAY | service-bus Summary
kandi X-RAY | service-bus Summary
PHP Lightweight Message Bus supporting CQRS.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Dispatches a command .
- Listen to a route event .
- Map message to route .
- Attach the router to the message bus .
- Routes an event .
- Create a command dispatch exception .
- Creates a new exception instance .
- Get message name .
- On route message .
- Detach all listeners from a MessageBus
service-bus Key Features
service-bus Examples and Code Snippets
Community Discussions
Trending Discussions on service-bus
QUESTION
I have located a couple of links showing how to Send and Receive messages with Databricks on Apache Spark, included in the following SO question posted sometime ago Structured Streaming with Azure Service Bus Topics
However, I'm struggling to find information on how to create a dataframe from the received messages in order to move the messages to say Azure Data Lake or SQL DB.
Has anyone come across any useful documentation?
Please Note: I'm not referring to Azure Event Hub
...ANSWER
Answered 2022-Mar-16 at 00:01My team and I were looking for the same ability to no avail. We ended up using an Azure function to execute a python script that leverages pandas and pyarrow to write as parquet to the raw zone of our data lake. That ended up causing issues when we tried to read the data with Spark.
Another approach that looks promising is using an azure function to write the messages as JSON in the raw zone. Then use the Auto Loader to process new JSON files.
https://docs.microsoft.com/en-us/azure/databricks/spark/latest/structured-streaming/auto-loader
There's also this suggestion from Microsoft:
QUESTION
I am currently using Azure.Messaging.ServiceBus .net SDK to send high throughput messages in batches to ASB standard. While simulating an intermittent network connectivity situation by turning off the internet during a high throughput batched send, we observed that there were some extra messages delivered to the ASB. The count observed in the ASB portal for the queue didn't match our logs. Can this happen with the ASB? Note that we have enabled retry policies enabled for the client. I came across a similar StackOverflow thread and want to know if there is any latest progress pertaining to this.
...ANSWER
Answered 2022-Mar-15 at 14:04Yes; the Service Bus guarantee is at-least-once. Duplicates are possible when publishing fails with an ambiguous state and is retried. Using the duplicate detection feature can help to guard against this, but requires that your application take responsibility for assigning unique MessageId
values.
Duplicates can also occur if a message is received and is not settled. Once its lock has expired, the message is eligible to be received again. Applications receiving messages should ensure that processing is idempotent and any needed detection or guards for duplicates are in place.
QUESTION
Can someone let me know if its possible to enable/update a Service Queue with Dupliate Message Detection after the Queue has been created?
The following link describes how to enable Duplicate Message Detection while creating a queue.
https://docs.microsoft.com/en-us/azure/service-bus-messaging/enable-duplicate-detection But I'm not seeing any information on how update an existing Queue to allow for Duplicate Message Detection ... or am I looking in the right place?
...ANSWER
Answered 2022-Mar-14 at 13:33The article you linked to has a big purple Note block right after the first paragraph. It states two things. The second statement is:
You can't enable or disable duplicate detection after the queue or topic is created. You can only do so at the time of creating the queue or topic.
This means you cannot update an existing Queue to allow for Duplicate Message Detection.
EDIT:
A small addition to the above: there is an --enable-duplicate-detection
parameter for the az servicebus queue update
Azure CLI command. Trying to use this, however, returns a BadRequest with SubCode 40000 and a specific error message.
Looking at Service Bus Resource Manager exceptions - Error: Bad Request, it states the following:
Error message Description Recommendation SubCode=40000. The value for the 'requiresDuplicateDetection' property of an existing Queue(or Topic) cannot be changed. The value for the 'requiresDuplicateDetection' property of an existing Queue(or Topic) cannot be changed. Duplicate detection must be enabled/disabled at the time of entity creation. The duplicate detection configuration parameter cannot be changed after creation.
EDIT:
According to the exceptions documentation linked to above (under Bad Request, second last item in the table), RequiresSessions
also needs to be specified during creation:
Support for sessions should be enabled at the time of entity creation. Once created, you cannot enable/disable sessions on an existing entity (queue or subscription)
QUESTION
As explained in MSDN (https://docs.microsoft.com/en-us/azure/service-bus-messaging/topic-filters) SQL Filter and Correlation Filter both uses message's system defined and user defined properties.
Can you please provide an example to show the difference among both?
...ANSWER
Answered 2022-Mar-04 at 05:27I have a blog post where all three filter types are explained
- Boolean filters
- Correlation filters
- SQL filters
There are several differences between correlation and SQL filters. Just to list a few
- Correlation filters are intended to operation on a few system properties such as
ContentType
,MessageId
,ReplyTo
,ReplyToSessionId
,SessionId
,To
, andCorrelationId
. SQL filters are not constrained to system properties only and can operation on user/applicaiton properties/headers. - Within a correlation filter, multiple conditions are AND-ed. SQL filter is much more flexible and can use AND as well as OR operations.
- The cost of evaluating filter expression is minimal and almost immediate w/o extra compute required. SQL filters can require more compute but offer more flexibility.
QUESTION
I couldn't find in in the docs, but the behaviour is not what I would expect.
Here it's written:
When specifying multiple match properties, the filter combines them as a logical AND condition, meaning for the filter to match, all conditions must match.
But it seems that it only concerns multiple correlation filters.
When I've defined SQL filter along with correlation filter it seemed like only 1 was used.
Can anyone point to specific place in docs where it's defined? I.e. how it exactly works - which filter is evaluated.
ANSWER
Answered 2022-Mar-02 at 21:39When defining multiple rules for a subscription, the rules are OR-ed. I.e. it's enough for a single rule to be evaluated as truthy for the message to be sent to a subscription.
QUESTION
I want to implement Azure Service Bus Topic/Subscription. Something like this
I'm looking at the Python implementation in the Azure Docs. What I don't understand, is when the message is sent, how does it know which subscription to go to?
...ANSWER
Answered 2022-Feb-28 at 20:08What I don't understand, is when the message is sent, how does it know which subscription to go to?
This is accomplished through topic filters
. Each message that gets sent to a Topic is "kind of broadcasted" (for the lack of better term) to every Subscription and the Subscription only accepts a message when that message matches one of the filter rules specified for that Subscription.
You can learn more about it here: https://docs.microsoft.com/en-us/azure/service-bus-messaging/topic-filters.
QUESTION
Following the best practices for reuse of Service Bus factories and clients, the reuse of ServiceBusReceiver
is recommended. This great answer for another question shows how a factory with such receivers can be implemented, which is then meant to be used as a singleton. However, I can't seem to find details of how this can be used together with a ServiceBusTrigger
. Can this be done?
I guess my question stems from a limited understanding of how the ServiceBusTrigger
is actually triggered, and how the different parameters of a trigger can be bound. I.e. does the trigger somehow create and use ServiceBusReceiver
under the hood? Any additional insight into this area is greatly appreciated!
Using the in-process worker for .Net 6, for a project with multiple ServiceBusTriggers
ANSWER
Answered 2022-Feb-21 at 15:38The trigger creates and manages the ServiceBusClient
and any senders/receivers that are used. Since the trigger is already handing messages to your function, normally, you wouldn't need to bind to the receiver directly for use in the body of the function; for message settlement and related activities, you'd make use of the ServiceBusMessageActions
as demonstrated here.
I don't believe that it is currently possible to bind directly to a ServiceBusReceiver
via the trigger; it appears we redirect that to the message actions implicitly (src) - but I haven't tried to verify that.
QUESTION
I have an HTTP trigger / Azure function that tries to write to a service bus. WHen I try to trigger locally via POSTMAN, this is the error I get in VSCODE:
...ANSWER
Answered 2022-Feb-25 at 18:32It appears that your network environment is not allowing traffic for ports 5671 and 5672. This is often resolved by configuring the ServiceBusClient
to use the web sockets transport which uses port 443 (default HTTPS port):
QUESTION
With reference to the below link, I see there is a credit-based system for ASB-standard. For data operations, it is 1 credit per message. If I send a batch of 50 messages, is it 50 credits used for that batch-send operation or 1 credit since I am sending one batch operation?
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-throttling
...ANSWER
Answered 2022-Feb-16 at 16:37For throttling, each call to SendAsync
or ReceiveAsync
counts once against the limit. In the case of sending, each batch is packaged as a single AMQP message and will consume a single credit.
QUESTION
I am getting the below exception stacktrace while deployed to env, it's working fine in my local:
...ANSWER
Answered 2022-Feb-10 at 09:03As you don't want downgrading from .Net 5.0 version, You can use the Azure.Messaging.ServiceBus
client library instead of using Microsoft.Azure.ServiceBus
.
Try the below code to receive/consume a message from service bus using the Azure.Messaging.ServiceBus client library:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install service-bus
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page