mq | MQ is a simple distributed in-memory message broker
kandi X-RAY | mq Summary
kandi X-RAY | mq Summary
MQ is a simple distributed in-memory message broker.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mq
mq Key Features
mq Examples and Code Snippets
Community Discussions
Trending Discussions on mq
QUESTION
I am using a managed RabbitMQ cluster through AWS Amazon-MQ. If the consumers finish their work quickly then everything is working fine. However, depending on few scenarios few consumers are taking more than 30 mins to complete the processing. In that scenarios, RabbitMQ deletes the consumer and makes the same messages visible again in the queue. Becasue of this another consumer picks it up and starts processing. It is happing in the loop. Therefore the same transaction is getting executed again and I am loosing the consumer as well. I am not using any AcknowledgeMode so I believe it's AUTO by default and it has 30 mins limit. Is there any way to increase the Delivery Acknowledgement Timeout for AUTO mode? Or please let me know if anyone has any other solutions for this.
...ANSWER
Answered 2021-Sep-02 at 13:29This is the response from AWS support.
From my understanding, I see that your workload is currently affected by the consumer_timeout parameter that was introduced in v3.8.15. We have had a number of reach outs due to this, unfortunately, the service team has confirmed that while they can manually edit the rabbitmq.conf, this will be overwritten on the next reboot or failover and thus is not a recommended solution. This will also mean that all security patching on the brokers where a manual change is applied, will have to be paused. Currently, the service does not support custom user configurations for RabbitMQ from this configuration file, but have confirmed they are looking to address this in future, however, is not able to an ETA on when this will available.
From the RabbitMQ github, it seems this was added for quorum queues in v3.8.15 (https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.8.15 ), but seems to apply to all consumers (https://github.com/rabbitmq/rabbitmq-server/pull/2990 ).
Unfortunately, RabbitMQ itself does not support downgrades (https://www.rabbitmq.com/upgrade.html ) Thus the recommended workaround and safest action form the service team, as of now is to create a new broker on an older version (3.8.11) and set auto minor version upgrade to false, so that it wont be upgraded. Then export the configuration from the existing RabbitMQ instance and import it into new instance and use this instance going forward.
QUESTION
I have create a simple Serilog sink project that looks like this :
...ANSWER
Answered 2022-Feb-23 at 18:28If you refer to the Provided Sinks list and examine the source code for some of them, you'll notice that the pattern is usually:
- Construct the sink configuration (usually taking values from
IConfiguration
, inline or a combination of both) - Pass the configuration to the sink registration.
Then the sink implementation instantiates the required services to push logs to.
An alternate approach I could suggest is registering Serilog without any arguments (UseSerilog()
) and then configure the static Serilog.Log
class using the built IServiceProvider
:
QUESTION
My company is using 2 Windows servers. 1 Server is running as a backup server and other than SQL replication, the backup server requires manual intervention to get it running as the primary. I have no control over this, but I do have control of the apps/services running on the servers.
What I have done is I got all the services to be running on both and added Rabbit MQ as a clustered message broker to kind of distribute the work between the servers. This is all working great and when I take a server down, nothing is affected.
Anyway, to the point of the question, the only issue I see is that the services are using the same SQL server and I have nothing in place to automatically switch server if the primary goes down.
So my question is, is there a way to get Entity Framework to use an alternative connection string should one fail?
I am using the module approach with autofac as dependency injection for my services. This is the database registration.
...ANSWER
Answered 2021-Aug-02 at 12:47You can define on custom retry strategy on implementing the interface IExecutionStrategy
.
If you want reuse the default SQL Server retry strategy, you can derive from SqlServerRetryingExecutionStrategy
on override the method ShouldRetryOn
:
QUESTION
I have an exchange with a type of topic
that only redirects messages to queue payments
Somewhere in the future, I will decide to add another queue payment_analyze
to analyze all old and new messages that have been enqueued.
durable exchanges and queues survive rabbit MQ restarts, persistent messages get written to disk but when binding a new queue to an old durable exchange, old messages do not get redirected (only new ones do get redirected)
From my understanding, this is the intended behavior as exchanges do not store messages and only act as a "proxy"
How do I achieve this?
Possible Solution
Creating a queue named parking
and adding every enqueued message to it, whenever a new queue is added, consume messages from parking
without acknowledging to keep the new queue "semi" up to date.
ANSWER
Answered 2022-Feb-10 at 10:32Even though your configured persistent messages on the payments
queue, this just means messages will survive a broker restart - once a message has been consumed and acknowledged it would be removed.
If you know you're going to need the payment_analyze
queue at some point in the future, is it viable to just create this queue/binding upfront and route messages to both payment_analyze
and payments
? Messages on the payment_analyze
will bank up until you're ready to start consuming them. Note: If you're producing a large number of messages this approach might result in storage issues...
As an alternative, you could write the messages to BLOB storage (or some other data store) as part of your payments
queue consumer (or a different queue/consumer altogether) and then when you're ready to introduce the payment_analyze
queue, you could write a script to read all the old messages from BLOB storage and send them to the RabbitMQ exchange. With 'topic' exchanges - see here - you can probably be clever with wildcards and routing keys in your queue bindings to ensure both old messages (from BLOB storage) as well as new messages are both routed to the payment_analyze
queue, but only new messages are routed to the payments
queue (so that your payments
queue consumer is not reprocessing old messages).
Another option (assuming you're not overly invested in RabbitMQ) could be to consider Apache Kafka instead which deals with this scenario quite nicely as messages aren't automatically removed from a partition once they've been processed by a subscriber.
Anyways, just a few options to consider...
QUESTION
I have IBM MQ running in one docker container and in another container I have IBM Websphere running. From Websphere I am trying to create QCF using CCDT connection method. I have copied CCDT file inside /tmp folder of Websphere container, when I test the connection I get the error:
...ANSWER
Answered 2022-Jan-28 at 21:45JSON CCDT support was not added to IBM MQ until 9.2 LTS. You won't be able to use it with a 9.1.0.7 RA.
Your only options are to use a binary CCDT or add/installed the 9.2 RA (rar) for WAS to use instead of the builtin 9.1.0.7 RA.
9.2.0.4 is the latest and you can download the java-all package to obtain the rar file.
QUESTION
I'm quite new to IIB and MQ Explorer.
Is it possible to send an XML file to a queue and then reading it and modifying it through IIB without 3rd party programs (like RfhUtil
)?
In IIB I have a Message flow that consists of MQ Input > Java Compute > MQ Output.
My MQ Explorer has 2 Queues, INPUT
and OUTPUT
.
I want to be able to send a file to the MQ Input(connected to 'INPUT' queue) and then modifying it in the Java Compute and lastly sending it to the MQ Output(connected to 'OUTPUT' queue)
I'm asking that because I did not encounter an option to send anything except "Put Test Message" which does not have the option to add a file.
I'm running everything locally because I'm still learning (Local Queues as well, if it matters).
Thanks in advance, if the question is lacking information, please let me know.
...ANSWER
Answered 2021-Sep-23 at 13:00I dont see any requirement for the input queue. It sounds as if your real requirement is
- Read an input file using a FileInput node
- Use JavaCompute to construct the output message tree
- Put the output message to the output queue
QUESTION
I am trying to make some templated version of consteval functions, I am not clear if there are any restrictions here.
...ANSWER
Answered 2021-Dec-01 at 13:00As pointed out by, @cigien this is indeed a clang bug. It works fine with gcc.
QUESTION
PhpStorm xdebug can't find file when connection comes from docker container
Tried by this. When added PHP_IDE_CONFIG to my docker, then xdebug did not even stop. Before adding that env variable, xdebug at least stops but I am not able to step through lines, it just shows an error:
...Cannot find file
'/var/www/pmp-api/bin/console'
locally. To fix it set server name by environment variablePHP_IDE_CONFIG
and restart debug session.
ANSWER
Answered 2021-Nov-19 at 17:44Check the log. Check if xdebug connects, if it tries to connect to correct ip. In my case it was trying to to connect to wrong ip. So needed to change this config to this value:
xdebug.remote_host=192.168.31.26
Next thing - PhpStorm started writing
Cannot parse server name for external Xdebug connection. To fix it create environment variable PHP_IDE_CONFIG on the remote server. Windows: set PHP_IDE_CONFIG="serverName=SomeName" Linux / Mac OS X: export PHP_IDE_CONFIG="serverName=SomeName".
So got in docker container and run the export. ServerName has to be same as Name field in PhpStorm config
QUESTION
I've had a bit of a look around Stackoverflow and the wider Internet and identified that the most common causes for this error are conflation of declaration (int var = 1;
) and definition (int var;
), and including .c
files from .h
files.
My small project I just split from one file into several is not doing any of these things. I'm very confused.
I made a copy of the project and deleted all the code in the copy (which was fun) until I reached here:
main.c ...ANSWER
Answered 2021-Nov-10 at 21:14Yes there was a change in behaviour.
In C you are supposed to only define a global variable in one translation unit, other translation unit that want to access the variable should declare it as "extern".
In your code, a.h is included in both a.c and main.c so the variable is defined twice. To fix this you should change the "int test" in a.h to "extern int test", then add "int test" to a.c to define the variable exactly once.
In C a definition of a global variable that does not initialise the variable is considered "tentative". You can have multiple tentative definitions of a variable in the same compilation unit. Multiple tentative defintions in different compilation units are not allowed in standard C, but were historically allowed by C compilers on unix systems.
Older versions of gcc would allow multiple tenative definitions (but not multiple non-tentative definitions) of a global variable in different compilation units by default. gcc-10 does not. You can restore the old behavior with the command line option "-fcommon" but this is discouraged.
QUESTION
I have a file that is very large. I need to rearrange something in the file but the file is too large to load into memory. I was thinking of ways to achieve this goal and what I came up with was just editing the file line by line. So what I need to do is read the file, remove certain columns, and then write the file. As I mentioned before, the file is very large so I need to write the file as the script runs. I will give an example data set and the code that I am using
Here is an example dataset
...ANSWER
Answered 2021-Nov-02 at 16:05seperator should be \n
instead of \t
while writing to the file. Also opening file in w
mode inside the for
loop overrides the previous contents of the file.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mq
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page