rabbitmq

Modify and re-queue a message using pika on python

Modify and re-queue a message using pika on python Question: I’m using Pika/RabbitMQ lib for processing messages in a python 3.8 project. When processing the messages the function can fail due to several reasons. There are a few cases when the message can be recovered in part if modified. I’m currently creating a new message …

Total answers: 1

How to communicate two or more microservices in django rest framework?

How to communicate two or more microservices in django rest framework? Question: I have been looking to communicate two or multiple microservices in django and need to make them communicate with each. I’ve reasearched about it and didnt get proper info about it. what i understood is each microservices application completely dont depend on one …

Total answers: 2

Unable to perform RMQ publish from Locust "BlockingIOError: [WinError 10035]"

Unable to perform RMQ publish from Locust "BlockingIOError: [WinError 10035]" Question: My project requires client sending messages directly to Rabbit MQ and we need to do load testing for this. I tried PIKA, works fine in a plain python file but as soon as I tried to implement this in Locust I start getting error …

Total answers: 3

RabbitMQ Python PIKA – using add_callback_threadsafe lost acknowledgement when stopping program

RabbitMQ Python PIKA – using add_callback_threadsafe lost acknowledgement when stopping program Question: I’m using pika to process RabitMQ message by small batch, and using a thread for each batch. At the end of the function in the thread, I send acknowledgement of the messages through add_callback_threadsafe to the channel. In parallele I’m catching SIGINT signals …

Total answers: 1

How to integrate RabbitMQ RPC into FastApi properly

How to integrate RabbitMQ RPC into FastApi properly Question: I am improving my FastAPI project. One of the methods needs to run a heavy computational task on another machine. Due to the high load this should be done in a queue way. I am following RabbitMQ RPC guide to perform remote procedure call via message …

Total answers: 1

Django Installed app and ImproperlyConfigured Error: django.core.exceptions.ImproperlyConfigured

Django Installed app and ImproperlyConfigured Error: django.core.exceptions.ImproperlyConfigured Question: django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. Actually, I am maiking a RabbitMQ consumer in Dango Project in the same directory as the manage.py file, i am facing the above error. …

Total answers: 2

Python – RabbitMQ Pika consumer – How to use async function as callback

Python – RabbitMQ Pika consumer – How to use async function as callback Question: I have the following code where I initialize a consumer listening to a queue. consumer = MyConsumer() consumer.declare_queue(queue_name="my-jobs") consumer.declare_exchange(exchange_name="my-jobs") consumer.bind_queue( exchange_name="my-jobs", queue_name="my-jobs", routing_key="jobs" ) consumer.consume_messages(queue="my-jobs", callback=consumer.consume) The problem is that the consume method is defined as follows: async def consume(self, channel, …

Total answers: 2

django celery error: Unrecoverable error: AttributeError("'EntryPoint' object has no attribute 'module_name'")

django celery error: Unrecoverable error: AttributeError("'EntryPoint' object has no attribute 'module_name'") Question: I am perplexed,from a weird error which i have no idea as i am new to celery, this error occurs on just the setup phase, every thing is simply configured as written in the celery doc https://docs.celeryq.dev/en/stable/django/first-steps-with-django.html the tracback is: (env) muhammad@huzaifa:~/Desktop/practice/app$ celery …

Total answers: 4