service-bus | PHP Service Bus implementation | Pub Sub library

 by   php-service-bus PHP Version: v5.1.0 License: MIT

kandi X-RAY | service-bus Summary

kandi X-RAY | service-bus Summary

service-bus is a PHP library typically used in Messaging, Pub Sub applications. service-bus has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

A concurrency (based on Amp) framework, that lets you implement an asynchronous messaging, a transparent workflow and control of long-lived business transactions by means of the Saga pattern. It implements the message based architecture and it includes the following patterns: Saga, Publish\Subscribe, Message Bus.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              service-bus has a low active ecosystem.
              It has 337 star(s) with 21 fork(s). There are 22 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 2 open issues and 6 have been closed. On average issues are closed in 68 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of service-bus is v5.1.0

            kandi-Quality Quality

              service-bus has 0 bugs and 0 code smells.

            kandi-Security Security

              service-bus has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              service-bus code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              service-bus is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              service-bus releases are available to install and integrate.
              service-bus saves you 2385 person hours of effort in developing the same functionality from scratch.
              It has 5614 lines of code, 483 functions and 129 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed service-bus and discovered the below as its top functions. This is intended to give you an instant insight into service-bus implemented functionality, and help decide if they suit your requirements.
            • Stop the event loop .
            • Use default signal handler
            • Configure the router .
            • Load service bus configuration .
            • Validate the provided environment .
            • Convert data to JSON .
            • Backoff a message .
            • Get a specific endpoint .
            • Create a new instance with the given key .
            • Resolve service context .
            Get all kandi verified functions for this library.

            service-bus Key Features

            No Key Features are available at this moment for service-bus.

            service-bus Examples and Code Snippets

            No Code Snippets are available at this moment for service-bus.

            Community Discussions

            QUESTION

            Moving Messages received from Azure Service Bus to Azure DataLake with Databricks
            Asked 2022-Mar-16 at 00:01

            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:01

            My 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:

            https://docs.microsoft.com/en-us/answers/questions/116689/spark-structured-streaming-azure-service-bus.html

            Source https://stackoverflow.com/questions/70985859

            QUESTION

            Will Azure Service Bus .net SDK deliver duplicate messages?
            Asked 2022-Mar-15 at 14:04

            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:04

            Yes; 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.

            Source https://stackoverflow.com/questions/71471154

            QUESTION

            How to Enable duplicate message detection for an Azure Service Bus queue or a topic After Queue has been created
            Asked 2022-Mar-14 at 13:33

            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:33

            The 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)

            Source https://stackoverflow.com/questions/71467594

            QUESTION

            What is the main difference between SQL filter and correlation filter in Azure Service Bus
            Asked 2022-Mar-04 at 05:27

            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:27

            I have a blog post where all three filter types are explained

            1. Boolean filters
            2. Correlation filters
            3. 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, and CorrelationId. 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.

            Source https://stackoverflow.com/questions/71346831

            QUESTION

            Azure service bus - combining SQL and Correlation filter
            Asked 2022-Mar-02 at 21:39

            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:39

            When 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.

            Source https://stackoverflow.com/questions/71329313

            QUESTION

            How do messages sent to an Azure Service Bus Topic know which subscription to go to?
            Asked 2022-Feb-28 at 20:08

            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:08

            What 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.

            Source https://stackoverflow.com/questions/71300494

            QUESTION

            How are ServiceBusReceivers managed by ServiceBusTriggers
            Asked 2022-Feb-28 at 13:40

            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:38

            The 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.

            Source https://stackoverflow.com/questions/71207995

            QUESTION

            Connecting to azure service bus from local windows 10 box failing
            Asked 2022-Feb-25 at 18:32

            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:32

            It 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):

            Source https://stackoverflow.com/questions/71269918

            QUESTION

            How is Azure Service Bus throttling applied on batch sends?
            Asked 2022-Feb-16 at 16:37

            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:37

            For 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.

            Source https://stackoverflow.com/questions/71143423

            QUESTION

            Getting System.InvalidOperationException: Operation is not valid due to the current state of the object while consuming Service Bus message
            Asked 2022-Feb-10 at 14:24

            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:03

            As 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:

            Source https://stackoverflow.com/questions/71058706

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install service-bus

            You can download it from GitHub.
            PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.

            Support

            Documentation can be found in the .documentation directory.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/php-service-bus/service-bus.git

          • CLI

            gh repo clone php-service-bus/service-bus

          • sshUrl

            git@github.com:php-service-bus/service-bus.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Reuse Pre-built Kits with service-bus

            Consider Popular Pub Sub Libraries

            EventBus

            by greenrobot

            kafka

            by apache

            celery

            by celery

            rocketmq

            by apache

            pulsar

            by apache

            Try Top Libraries by php-service-bus

            performance-comparison

            by php-service-busPHP

            sagas

            by php-service-busPHP

            demo

            by php-service-busPHP

            skeleton

            by php-service-busPHP

            scheduler

            by php-service-busPHP