jakubkulhan / bunny

Performant pure-PHP AMQP (RabbitMQ) sync/async (ReactPHP) library
MIT License
698 stars 101 forks source link

Compatibility with Azure Event Hubs #119

Closed jbelien closed 2 years ago

jbelien commented 2 years ago

Hello,

This library looks awesome and I'm trying to use it to connect to Azure Event Hubs (AMQP compatible).

I'm using worker-async.php and the following connection (according to what I've found in Azure Event Hubs documentation).

$clientConfig = [
    "host" => "###.servicebus.windows.net",
    "port" => 5672, // I also tried 5671
    "user" => '$ConnectionString',
    "password" => "Endpoint=sb://###.servicebus.windows.net/;SharedAccessKeyName=###;SharedAccessKey=###",
];

I get the following exception:

Uncaught Bunny\Exception\ClientException: Broken pipe or closed connection.

Is Bunny library compatible with Azure Event Hubs and if so how can I connect to it ?

Thanks a lot for any help or insight!

WyriHaximus commented 2 years ago

Hey @jbelien, which version of AMQP does event hubs support? Bunny implements AMQP 0.9.1

jbelien commented 2 years ago

Aaah, that's probably why : Azure Event Hubs implements AMQP 1.0 (https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-amqp-protocol-guide).

Thanks @WyriHaximus for the quick answer. I'll continue my investigation. 😄