amqp

SmallRye Reactive Messaging's Emitter<>.send doesn't send in Kotlin via AMQP broker with Quarkus

情到浓时终转凉″ 提交于 2019-12-11 06:07:21
问题 Currently, I am trying to write a 'notification service' based on Maven, Quarkus and SmallRye Reactive Messaging in Kotlin. As a base I have an example in Java which works fine and I was trying to "translate" it into Kotlin. The way I want it to work is, that I send an HTTP request (e.g. GET http://localhost:8080/search/{word}) and the system sends the 'word' (here a String) to the queue 'queries' of the Artemis AMQP message Broker. Another system subscribes to the message Broker and fetches

Spring integration - channel adapter vs. gateway (AMQP)

那年仲夏 提交于 2019-12-11 05:47:50
问题 I'm confused about the difference of Channel Adapters and Gateways in spring integration. As stated in https://stackoverflow.com/a/29992267/467944 by @gary-russell channel adapters are un-diirectional while gateways are bi-directional. If this is the case, why there is a amqp inbound gateway as well as an amqp outbound gateway? What I'm trying to accomplish in the end is the following: Http request received within a controller place message on amqp queue consumer consumes messages and put

RabbitMQ — Why does the wrong subscriber get a published message?

六月ゝ 毕业季﹏ 提交于 2019-12-11 04:12:59
问题 I have two services, Manager and Collector . Manager is subscribed to Queue COLLECTED_USER with routingKey user.collected and invokes a UserCollected handler. Collector is subscribed to Queue COLLECT_USER with routingKey user.collect and invokes a CollectUser handler. There can be multiple collectors so I have set exclusive to false (see below for code). There are also other services that listen for events like user.created , user.updated , user.deleted In addition there are services that

AMQPNETLITE - ActiveMQ Artemis (Red Hat AMQ) - autocreate multi-consumer multicast queue

坚强是说给别人听的谎言 提交于 2019-12-11 03:07:52
问题 This qeuestion is on consuming the messages using AMQP in .Net. The documentation recommends amqpnetlite: https://access.redhat.com/documentation/en-us/red_hat_amq/7.0/html-single/using_the_amq_.net_client/index On subscribing to an address using AMQPNetLite, the address and the queue will be auto-created. The auto-created queue is always "unicast" though. I have not been able to auto-create a multicast queue that allowed any number of consumers. Code: private async Task RenewSession() {

Transport scheme NOT recognized: [amqp]

隐身守侯 提交于 2019-12-11 01:15:59
问题 Am trying to use AMQP with ActiveMQ and am getting the following error Transport scheme NOT recognized: [amqp] This is my code ConnectionFactory connectionFactory = new ActiveMQConnectionFactory( "amqp://localhost:61616"); Connection connection = null; try { connection = connectionFactory.createConnection(); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Queue queue = session.createQueue("somequeue"); MessageProducer producer = session

Routing messages in RabbitMQ topic exchange that do NOT match a pattern

二次信任 提交于 2019-12-10 18:17:20
问题 Two queues are bound to a topic exchange with the following routing keys: Queue A, bound with routing key pattern match *.foo Queue B, bound with routing key pattern match *.bar I'd like to add a third queue to this exchange that receives messages that are neither foo messages nor bar messages. If I bind this queue with a # routing key, I naturally get all messages I need, but including foo 's and bar 's which I don't want. Any way to route messages patching a pattern NOT *.foo AND NOT *.bar

AMQPRuntimeException: Error reading data. Received 0 instead of expected 7 bytes

浪尽此生 提交于 2019-12-10 17:53:46
问题 It was working, but now it's not working anymore! I'm using php-amqplib and RabbitMQ. when I'm trying to create a new AMQP connection: $connection = new AMQPConnection('localhost', 5672, 'username', 'password'); The code inside the library that is causing this error is: public function read($n) { $res = ''; $read = 0; while ($read < $n && !feof($this->sock) && (false !== ($buf = fread($this->sock, $n - $read)))) { if ($buf === '') { continue; } $read += strlen($buf); $res .= $buf; } if

AMQP Spring Integration error handling

╄→尐↘猪︶ㄣ 提交于 2019-12-10 17:53:40
问题 I've got an integration flow that looks like the following: @Bean public IntegrationFlow auditFlow(@Qualifier("eventLoggingConnectionFactory") ConnectionFactory connectionFactory, @Qualifier("writeChannel") MessageChannel messageChannel, @Qualifier("parseErrorChannel") MessageChannel errorChannel) { return IntegrationFlows .from(Amqp.inboundAdapter(connectionFactory, auditQueue) .errorChannel(errorChannel) .concurrentConsumers(numConsumers) .messageConverter(new MongoMessageConverter())) //

Selective routing with RabbitMQ

≯℡__Kan透↙ 提交于 2019-12-10 17:47:13
问题 I have some queues bound to one topic exchange, e.g. with routing keys: 1) big.yellow.rabbit 2) small.*.dog 3) small.*.* 4) *.*.cat 5) *.*.* I want the RabbitMQ to choose only one queue to place my message by following logic: the number of coincident tags should be as big as possible coincidence of first tag is more importat than for second... Examples for aforementioned keys: big.yellow.rabbit -> 1) small.yellow.rabbit -> 3) small.white.cat -> 3) big.grey.cat -> 4) big.yellow.pig -> 5) I've

RabbitMQ 3.1.3 and the missing timestamp header

雨燕双飞 提交于 2019-12-10 17:39:54
问题 Is it possible to configure the broker to insert a timestamp header if it is missing in the message? So if the publishing client does not add the timestamp header, can the broker insert it with a timestamp value matching the moment the message was received by the exchange? Where should I look for that configuration? Or is that a bad idea? 回答1: So to answer your question, no there is no way to configure the broker to insert a timestamp. Nothing the in AMQP specification requires a message to