rocketmq-client cannot consumer message - message-queue

I am using rocketmq 4.3.1 client,Now I have encountered some problems. A consumer group that has been using it for a while has some unconsumed messages. Now I am new to the message queue, the consumer can't consume it normally, I have to restart the consumer service to consume the message. But I changed to a consumer group, and the consumer can get the message in the message queue center in real time.I want to know the reason for this problem.thanks a lot
enter image description here
enter image description here

I have found the reason, because the druid in the service of the rocketmq consumer has been retrying to connect to the database, causing the consumer to no longer get the message.

Related

Openshift AMQ6 - message order - queue

I use AMQ 6 (ActiveMQ) on OpenShift, and I use a queue with re-delivery with exponentialBackoff (set in connection query params).
When I have one consumer and two messages and the first message gets processed by my single consumer and does NOT get an ACK...
Will the broker deliver the 2nd message to the single consumer?
Or will the broker wait for the re-delivery to preserve message order.
This documentation states:
...Typically a consumer handles redelivery so that it can maintain message order while a message appears as inflight on the broker. ...
I don't want to have my consumer wait for re-delivery. It should consume other messages. Can I do this without multiple consumers? If so, how?
Note: In my connection query params I don't have the ActiveMQ exclusive consumer set.
I have read the Connection Configuration URI docs, but jms.nonBlockingRedelivery isn't mentioned there.
Can the resource adapter use it by query param?
If you set jms.nonBlockingRedelivery=true on your client's connection URL then messages will be delivered to your consumer while others are in the process of redelivery. This is false by default.

Get error message shown in the status of the transaction in EVM blockchain

I couldnt figure out how to get the status of the transactions i.e "Fail with error "001010".
The ability to show error message, or the revert reason. depends on the EVM client (GoEthereum, Erigon, Ganache, Ethereum Tester, etc.) There is no bulletproof "standard".
The clients store only the receipt field status that is 0 or 1 (=success)
The clients do not store the revert reason (I might be wrong on this one and this has changed lately)
To get the actual error message you need to replay the transaction and a certain block height using a special eth_call JSON-RPC.
Here is a Javascript library for doing it and a related blog post about the topic.

Citrus fails to find reply channel when receiving & sending messages in parallel

I'm using the Citrus framework to test Camel routes. I'm sending a request to the Camel-based application which in turn sends multiple requests in parallel to a SOAP server.
I'm trying to mock the SOAP server with Citrus using the parallel container. I use selectors to trigger the correct receive and send actions similar to the following example (the real code is a bit more complicated):
parallel().actions(
sequential().actions(
soap().server("soapService")
.receive()
.selector("xpath:local-name(/*)='exampleRequest1' AND xpath://ns1:id/text()='123'")
.payload(new ClassPathResource("data/123/exampleRequest1.xml")),
echo("Received exampleRequest1"),
soap().server("soapService")
.send()
.payload(new ClassPathResource("data/123/exampleResponse1.xml")),
echo("Sent exampleResponse1"),
),
sequential().actions(
soap().server("soapService")
.receive()
.selector("xpath:local-name(/*)='exampleRequest2' AND xpath://ns1:id/text()='456'")
.payload(new ClassPathResource("data/456/exampleRequest2.xml")),
echo("Received exampleRequest2"),
soap().server("soapService")
.send()
.payload(new ClassPathResource("data/456/exampleResponse2.xml")),
echo("Sent exampleResponse2"),
),
...
)
Citrus does indeed receive the messages but it cannot reply. The error message of each parallel thread is:
13:35:36.121 [Thread-22] ERROR com.consol.citrus.container.Parallel - Parallel test action raised error
java.lang.IllegalArgumentException: Failed to find reply channel for message correlation key: citrus_message_id = 'c37eb703-4fb3-4c34-98f8-9cf8ee0414a1'
at org.springframework.util.Assert.notNull(Assert.java:198)
at com.consol.citrus.channel.ChannelSyncConsumer.send(ChannelSyncConsumer.java:73)
at com.consol.citrus.actions.SendMessageAction.doExecute(SendMessageAction.java:125)
…
Important: The citrus_message_id that each thread is looking for is always the same but should be different. So if one of the send actions actually succeeds, it's usually sending with the wrong reply channel.
What could be the problem here? Is this a bug or am I missing something?
Thank you very much!
The parallel container causes the problems here. But you can safely remove the parallel container when using selectors in receive actions. It should work fine for you once you have removed the parallels

Mavlink pre-flight configuration

I'm using mavlink with a pixhawk flight controller. I receive messages from heartbeat thought I don't know how to receive information about it's altitude, pitch, roll or yaw.
When I connect pixhawk through qgroundcontrol application I immediately connected and can see the direction on compass, yet I don't know how to replicate that. The information I'm specificallly looking for can be received by getting a return from messages: msg_vfr_hud.MAVLINK_MSG_ID_VFR_HUD, msg_ahrs2.MAVLINK_MSG_ID_AHRS2, msg_ahrs3.MAVLINK_MSG_ID_AHRS3.
I tried creating them like that:
msg_ahrs2 msg = new msg_ahrs2();
communicationService.pushMavLinkMessage(msg);
But I don't receive any information back. Do I have to make any preflight configuration?
Any help will be appreciated.
When the connection is established between the flight controller and companion board, the flight controller will automatically start sending telemetry messages (like GPS information ..).
The connection between the flight controller and the companion board is either serial or by socket (TCP/UDP) so you should handle the incoming data correctly and use mavlink_parse_char function to get mavlink packet format.
You can use dronekit (A python API) , Ottofly (C++ API) or you can build your own one to get and send data to flight controller.
Check this example in C for Udp connection.

Does Strophe support message carbon?

I am planning to add in the message carbon function(when a user is logged into multiple device and send a message or/receive a message, it will sync between all devices) for a chat server, i am running on Ejabberd and using strophe.js...
I am wondering if there are plugin written for Ejabberd that i can install and also for strophe.js???
I looked over https://github.com/processone/ejabberd-contrib and the github for strophe.js
None of them seem to have plugins for message carbon. Wondering if anyone has this implemented before??
I have read that if it doesnt, i should treat it as a groupchat??? I am not sure why that would work??? And not exactly sure if thats good for the resources, and what if it scales up, would that have impact on the overall structure.
If it is treated as a group chat, then i assume each resource/session would be treated as a different user? Then when a message is sent into that group, all of those other session/users are updated, so even there are 2 users??
ejabberd supports message carbons as default in latest version.
This feature is unrelated to groupchat and cannot and should not be treated similarly.
If you read XEP-0280 Message Carbons you should see that sending a packet similar to the following is enough to enable it:
<iq id='enable1' type='set'>
<enable xmlns='urn:xmpp:carbons:2'/>
</iq>
You may find also valuable information in XMPP Academy video #2 at 27m30s.