Unable to retrieve messages using AMQP Trigger with Azure ServiceBus

Describe the issue/error/question

I’d provided the required credential and queue as per AMQP trigger but upon listening for 30s it returned with timeout message. It isn’t the timeout that’s the issue rather not able to connect to azure servicebus based on my test. Also noticed there isn’t a way to set the protocol such as amqps.

As it is a sandpit, anyone are welcome to test it using credential:
host name: amqp-wood-dev.servicebus.windows.net
port: 5671
user: amqpsas
password: ANuKRINR2lh3MwJN1qL2dSHqb0BP2DX0piHdo8Ecc7o=

the queue name is myqueue but expected to includes the namespace hence: amqp-wood-dev/myqueue

I used a sample from microsoft send message using node to send sample messages and it works, you can try if wanted to ensure there is always messages in the queue by replacing the value with
connectionString: “Endpoint=sb://amqp-wood-dev.servicebus.windows.net/;SharedAccessKeyName=amqpsas;SharedAccessKey=ANuKRINR2lh3MwJN1qL2dSHqb0BP2DX0piHdo8Ecc7o=;EntityPath=myqueue”

queueName: “myqueue”

What is the error message (if any)?

output from console as below
When port being 5671 (default)
[connection-1] disconnected Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
errno: -4077,
code: ‘ECONNRESET’,
syscall: ‘read’
}

When port being 5672
[connection-1] error on read: ProtocolError: Invalid AMQP protocol id 2 expecting: 0 (buffer:0x41,0x4d,0x51,0x50,0x02,0x01,0x00,0x00)

When port being 5673 (invalid port, for testing)
[connection-1] disconnected Error: connect ETIMEDOUT 51.141.14.113:5673
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
errno: -4039,
code: ‘ETIMEDOUT’,
syscall: ‘connect’,
address: ‘51.141.14.113’,
port: 5673
}

Please share the workflow

My workflow which is basic as the credential isn’t saved as below.

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.174.0
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: npm

Seems to pass without error message when specified “tls” as transport type, and for queue name remove the namespace, my case leave it as “myqueue” and it works.

1 Like