Hello,
I am currently attempting to use the code on
https://qpid.apache.org/releases/qpid-proton-0.10/proton/python/tutorial/tutorial.html
to send and receive a message to a HornetQ server.
(Slightly modified code below...)
I have set up a HornetQ core queue called exampleQueue1 to connect to and am
running the server. I get, e.g. "08:29:28,247 INFO [org.hornetq.core.server]
HQ221003: trying to deploy queue exampleQueue1" on the server console.
I have compiled the required c code for the example to run properly.
When I run the example below I get "ERROR:root:amqp:connection:framing-error:
SASL header mismatch: Insufficient data to determine protocol [''] (connection
aborted)" repeatedly until I kill the program.
I have googled this error but get very few hits and have not found one that is
sufficiently explanatory.
I will continue to try to work out how to solve this issue. However, I was
wondering if anyone could assist with this question?
Thanks & regards,
Matthew
from __future__ import print_function
from proton import Message
from proton.handlers import MessagingHandler
from proton.reactor import Container
class HelloWorld(MessagingHandler):
def __init__(self, server, address):
super(HelloWorld, self).__init__()
self.server = server
self.address = address
def on_start(self, event):
conn = event.container.connect(self.server)
event.container.create_receiver(conn, self.address)
event.container.create_sender(conn, self.address)
def on_sendable(self, event):
event.sender.send(Message(body="Hello World!"))
event.sender.close()
def on_message(self, event):
print(event.message.body)
event.connection.close()
helloWorld = HelloWorld("amqp://guest:guest@localhost:5672", "exampleQueue1")
Container(helloWorld).run()