0
pythonクライアントを使用してwso2メッセージブローカーにメッセージを消費して公開します。私は多くを検索し、wso2メッセージブローカー用に特別に設計されたPythonクライアントを見つけることができませんでした。wso2メッセージブローカークライアント(Python用)
私は、rabbitmqで動作するpikaライブラリがwso2メッセージブローカーで動作することがわかりましたが、
私はwso2キューにメッセージを公開するコードを書いています。 wso2メッセージブローカでテストキューを作成し、pikaライブラリを使用してメッセージを公開しようとしました。
import pika
params = pika.URLParameters("amqp://admin:[email protected]:5672/%2F")
connection = pika.BlockingConnection(params)
channel = connection.channel()
# channel.queue_declare(queue="testqueue", durable=True, exclusive=False, auto_delete=False)
if channel.basic_publish(exchange='', routing_key='testqueue',
body='New message for testing',
properties=pika.BasicProperties(content_type='text/plain', delivery_mode=1),
mandatory=True):
print(" Message was published sucessfully")
else:
print("message could not be published")
メッセージは公開されていますが、公開されていません。しかし、wso2メッセージブローカでは、コンソールエラーが発生しています。上記のコード
[ Sequence: 24976 ] Exception occurred while processing inbound events.Event type: MESSAGE_EVENT
java.lang.NullPointerException
at java.util.HashSet.<init>(HashSet.java:118)
at org.wso2.andes.kernel.router.QueueMessageRouter.getMatchingStorageQueues(QueueMessageRouter.java:88)
at org.wso2.andes.kernel.disruptor.inbound.MessagePreProcessor.preProcessIncomingMessage(MessagePreProcessor.java:214)
at org.wso2.andes.kernel.disruptor.inbound.MessagePreProcessor.updateRoutingInformation(MessagePreProcessor.java:190)
at org.wso2.andes.kernel.disruptor.inbound.MessagePreProcessor.onEvent(MessagePreProcessor.java:75)
at org.wso2.andes.kernel.disruptor.inbound.MessagePreProcessor.onEvent(MessagePreProcessor.java:49)
at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)