Should have read all the mails first. Your python code below is almost certainly for an AMQP 0-x protocol client but note that Artemis supports clients using the AMQP 1.0 ISO standard protocol, so you won't be able to use that client with Artemis even once you set the dependencies+acceptor up correctly.
On Thu, 14 Dec 2023 at 10:08, Shurya kumar <shurya.c...@gmail.com> wrote: > > I was doing telnet on 8990. > > --telnet 127.0.0.1 8990 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > Connection closed by foreign host. > > > ----------------- > I tried with making the ports as same in the broker url and acceptor. > Port used was 5672 > > In both the scenarios, the server logs was showing > > 2023-12-14 15:33:14.362 DEBUG 12156 --- [ost-1787830293)] > o.a.a.a.c.r.s.i.RemotingServiceImpl : > RemotingServiceImpl::removing connection ID 43b1acbd > > And in the python client, it threw the following after 10 seconds > > Traceback (most recent call last): > > File "please_work.py", line 8, in <module> > > connection = pika.BlockingConnection(pika.URLParameters(broker_url)) > File > "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", > line 360, in __init__ > self._impl = self._create_connection(parameters, _impl_class) > File > "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", > line 451, in _create_connection > raise self._reap_last_connection_workflow_error(error) > pika.adapters.utils.connection_workflow.AMQPConnectorStackTimeout: > Timeout during AMQP handshake'127.0.0.1'/(<AddressFamily.AF_INET: 2>, > <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 5672)); ssl=False > > > The following is the python code being used > > import pika > > # Connection parameters > broker_url = 'amqp://127.0.0.1:5672' > queue_name = 'TEST' > > # Establish a connection to the broker > connection = pika.BlockingConnection(pika.URLParameters(broker_url)) > channel = connection.channel() > > # Declare a queue > channel.queue_declare(queue=queue_name) > > > # Send a message to the queue > message_body = 'Hello from Python!' > channel.basic_publish(exchange='', routing_key=queue_name, body=message_body) > print(f" [x] Sent '{message_body}'")