0
votes

I have a requirement to create an events hub that will allow multiple consumers to consume the same event. Azure event hubs looks perfect for this however I am struggling with PHP support as there are a number of SDK's but none for PHP.

Looking on the docs here https://docs.microsoft.com/en-us/rest/api/eventhub/send-event i see there is a way to send an event through a rest API but i have been unable to find a way of consuming these events.

Does anyone know of a way of consuming these jobs in a PHP applications or is anyone aware of an PHP SDK or a REST API that will allow me to consume the jobs?

2

2 Answers

1
votes

To my knowledge, there is no REST support for consuming events; doing so requires using the AMQP protocol.

Unfortunately, there is no Event Hubs support in the Azure SDK for PHP and I've not seen it on the roadmap. That doesn't mean that it won't be added at some point, but it is likely something that you'd not be able to rely on in the short term.

I can't speak to the best option for PHP natively, as I have only a passing familiarity. One thing that you may consider is using the PHP dotnet class to use the Event Hubs client library for .NET or the PHP/Java bridge to consume the Event Hubs client library for Java.

0
votes

Azure Event Hubs is compatible with Kafka.

Take a look at this example here on how to connect using the php-rdkafka client:

https://github.com/Azure/azure-event-hubs-for-kafka/issues/51#issuecomment-496484398