amqp | amqplib wrapper that eases the consumption of RabbitMQ | Pub Sub library
kandi X-RAY | amqp Summary
kandi X-RAY | amqp Summary
anik/amqp is a php-amqplib wrapper that eases the consumption of RabbitMQ. A painless way of using RabbitMQ. You can use this package with.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Publishes multiple messages .
- Consume messages .
- Re - reconfigure configuration .
- Bind a queue key .
- Create a new connection instance .
- Set the properties .
- Assert that the message is set .
- Set global flag .
- Set the field s name .
- Sets the exchange type .
amqp Key Features
amqp Examples and Code Snippets
@Bean
@ConditionalOnProperty(
value = "amqp.configuration.current",
havingValue = "simple-dlq")
public SimpleDLQAmqpContainer simpleAmqpContainer() {
return new SimpleDLQAmqpContainer(rabbitTemplate);
}
@Bean
public AmqpAdmin amqpAdmin() {
return new RabbitAdmin(connectionFactory());
}
public static void main(String[] args) {
SpringApplication.run(AmqpServer.class, args);
}
Community Discussions
Trending Discussions on amqp
QUESTION
I just switched from ForkPool to gevent with concurrency (5) as the pool method for Celery workers running in Kubernetes pods. After the switch I've been getting a non recoverable erro in the worker:
amqp.exceptions.PreconditionFailed: (0, 0): (406) PRECONDITION_FAILED - delivery acknowledgement on channel 1 timed out. Timeout value used: 1800000 ms. This timeout value can be configured, see consumers doc guide to learn more
The broker logs gives basically the same message:
2021-11-01 22:26:17.251 [warning] <0.18574.1> Consumer None4 on channel 1 has timed out waiting for delivery acknowledgement. Timeout used: 1800000 ms. This timeout value can be configured, see consumers doc guide to learn more
I have the CELERY_ACK_LATE
set up, but was not familiar with the necessity to set a timeout for the acknowledgement period. And that never happened before using processes. Tasks can be fairly long (60-120 seconds sometimes), but I can't find a specific setting to allow that.
I've read in another post in other forum a user who set the timeout on the broker configuration to a huge number (like 24 hours), and was also having the same problem, so that makes me think there may be something else related to the issue.
Any ideas or suggestions on how to make worker more resilient?
...ANSWER
Answered 2022-Mar-05 at 01:40For future reference, it seems that the new RabbitMQ versions (+3.8) introduced a tight default for consumer_timeout
(15min I think).
The solution I found (that has also been added to Celery docs not long ago here) was to just add a large number for the consumer_timeout
in RabbitMQ.
In this question, someone mentions setting consumer_timeout to false, in a way that using a large number is not needed, but apparently there's some specifics regarding the format of the configuration for that to work.
I'm running RabbitMQ in k8s and just done something like:
QUESTION
I'm working with Symfony 4.4 and Symfony Messenger
Messenger configuration includes a transport and routing:
...ANSWER
Answered 2022-Mar-02 at 15:37For some reason this seems to be an error that happens with some frequency, so I rather post an answer instead of a comment.
You are supposed to add message classes to the routing configuration, not handler classes.
Your configuration should be, if you want that message to be manages asynchronously:
QUESTION
I'm testing a deployment of the Eclipse IoT Cloud2Edge package and have followed the instructions here https://www.eclipse.org/packages/packages/cloud2edge/tour/ to test. After creating the new tenant and device, and configuring the connection between Hono and Ditto, I can send telemetry to the new device via the Hono http adapter as shown here:
...ANSWER
Answered 2022-Feb-14 at 07:56What you configured is the Connection source enforcement which makes sure that a Hono device (identified via the AMQP header device_id
) may only updates the twin with the same "thing id" in Ditto.
That enforcement fails as your thingId you set in the Ditto Protocol JSON is my-tenant:org.acme:my-device-1
- the topic
's first segment is the namespace, the second segment the name - combined those 2 segments become the "thing ID", see also: Protocol topic specification.
So you probably want to send the following message instead:
QUESTION
I am very new to Elixir. I have built an app which runs locally, which works fine. But now i need to build a container for it with Docker.
However, every attempt to do a release seems to try and connection to RabbitMQ (which is running locally, as a Docker Container).
I don't want, cant have it try and connect to Rabbit each time this container is built, as it will need to be built by a CI / CD pipeline and will never have access to any Rabbit. I have set it up with an ENV, but this needs to be set within my YAML when deploying to my k8s cluster.
So this is the Dockerfile:
...ANSWER
Answered 2022-Jan-15 at 00:02I have tried to create a project such as yours.
QUESTION
In our company we use WSO2 EI V6.4. I made the configuration sur connect to azure service bus with this guide and all is working
Now we have to use the last patched version of EI 6.4, and when i made the same configuration, I get this error
...ANSWER
Answered 2021-Dec-21 at 22:17I have had similar problem and used version of qpid-jms-client-0.11.1
thats works for me. I get it from this Maven repository
QUESTION
Celery disconnects from RabbitMQ each time a task is passed to rabbitMQ, however the task does eventually succeed:
My questions are:
- How can I solve this issue?
- What improvements can you suggest for my celery/rabbitmq configuration?
Celery version: 5.1.2 RabbitMQ version: 3.9.0 Erlang version: 24.0.4
RabbitMQ error (sorry for the length of the log:
...ANSWER
Answered 2021-Aug-02 at 07:25Same problem here. Tried different settings but with no solution.
Workaround: Downgrade RabbitMQ to 3.8. After downgrading there were no connection errors anymore. So, I think it must have something to do with different behavior of v3.9.
QUESTION
I was writing an application and I had this issue, looking the code over and over, nothing seems to be wrong, tested with the below basic snippet and the issue is reproducible .... RabbitMQ is saying the queue is always empty when it is not.
The below Golang snippet shows a producer sending messages more often than the consumer consuming them. The consumer is always active but sleeping longer to make the queue have messages in its backlog. Result? The consumer fetches messages each time it tries however the API is always saying there are no messages -> message count is 0.
...ANSWER
Answered 2021-Nov-27 at 15:36The field q2.Messages
is unreliable, it is the count of messages not awaiting acknowledgment, i.e. messages already ACK'ed.
Your consumer is declared with autoAck = true
— i.e. noAck
—, which means that no acknowledgements are expected, which means that there are zero messages already ACK'ed.
When you comment out the consumer, the number of acknowledged messages likely depends on the publisher buffer.
Getting a precise number of messages programmatically on a given queue with AMQP 0.9.1 is basically not possible. You may use the message_stats
field in the management API instead:
QUESTION
I am finding it very difficult to work with RabbitMQ and AMQP 1.0, particularly as it pertains to topic exchanges using AMQPNetLite. I am unable to send a message using a topic exchange to a specific queue. I'm not even using wildcards.
My situation is super simple too. I have one topic exchange. I have one queue that the topic exchange sends to. When I send to the topic exchange, the queue never receives the message.
...ANSWER
Answered 2021-Nov-10 at 12:12i think you mix two ways of doing it. Either you publish to address "/topic/test" -where test is your routingkey OR you publish to "/exchange/test.exchange" and set the Subject-property to "test".
Both works. if you use the "/topic/"-prefix in your address you are going through the default "amq.topic"-exchange and not your own "test-exchange".
made sense? more information in the "Routing and Addressing"-secion here: https://github.com/rabbitmq/rabbitmq-amqp1.0
QUESTION
So I'm building a webapp using FastAPI. I use Celery to run some background tasks. My code works fine on my local development machine, but when I try to dockerize it, it seems the FastAPI app running on a container, can't sync with celery. For instance I have 4 containers:
If I start the webapp locally on my computer, and don't start the padel-checker-web-1 container and only use the other 3, celery on docker syncs with it and works.
My problem is having the webapp running inside docker and using celery, they just don't sync.
I'm pasting my docker-compose.yml to see if someone can point me in the right direction:
...ANSWER
Answered 2021-Nov-09 at 18:24I've fixed my docker-compose.yml, I guess it was the depends_on:
QUESTION
I'm creating application using Spring Boot with RabbitMQ. I've created configuration for Rabbit like this:
...ANSWER
Answered 2021-Oct-20 at 15:44Rabbit starts resend last not processed message without any delay
That's how redelivery works: it re-push the same message again and again, until you ack it manually or drop altogether. There is no delay in between redeliveries just because an new message is not pulled from the queue until something is done with this one.
I can't define infinity attempt amount in options
maxAttempts
Have you tried an Integer.MAX_VALUE
? Pretty decent number of attempts.
The other way is to use a Delayed Exchange: https://docs.spring.io/spring-amqp/docs/current/reference/html/#delayed-message-exchange.
You can configure that retry with a RepublishMessageRecoverer
to publish into a your original queue back after some attempts are exhausted: https://docs.spring.io/spring-amqp/docs/current/reference/html/#async-listeners
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install amqp
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