Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8347313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:19:39+00:00 2026-06-09T07:19:39+00:00

I need different messages to be sent to the queue – each by its

  • 0

I need different messages to be sent to the queue – each by its personal schedule. So I have message list and related interval to resend each one. I use rabbitMQ/pika and apscheduler.
According to numerous examples, I created the simplest BlockingConnection/channel/queue. When immediately after that I try to push messages – everything works fine, I can see in rabbitmq web-interface that all the messages become in the queue. Here is the piece of code that works:

    self.cr = Queue('DIRECT_C_QUEUE', True, ex_type='direct')
    for i in range(1,10000):
        self.cr.channel.basic_publish(exchange='', routing_key='DIRECT_C_QUEUE', body='hello_world')

But if I try to push messages (in exactly same way) via apscheduler callback function – only few (about 1-10) messages appear in the queue (but callbacks are fired all the time and there are no any exception when publishing message!).

Finally I begin to receive such warnings:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pika/connection.py:642: UserWarning: Pika: Write buffer exceeded warning threshold at 1125 bytes and an estimated 43 frames behind
warn(message % (self.outbound_buffer.size, est_frames_behind))

and still no new messages in the queue.

I am new in python, any help is much appreciate.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:19:40+00:00Added an answer on June 9, 2026 at 7:19 am

    I found source of the problem:
    apscheduler runs basic_publish calls in separate thread, and pika doesn’t recommend share connections between threads – http://pika.github.com/faq.html

    So I had choice either create new connection each time, or put new messages in some queue and publish them from the main thread (where connection was created).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A program receives a list of Messages (base type). Each message in the list
I'm coding an android app for parsing sms messages. I need different rules for
We need to read and count different types of messages/run some statistics on a
I am creating one application for student. I need to set the different message
So long story short, i have some forms (2) of them that, need different
I need a different random number for each row in my table. The following
I have three different development machines. Do I need three different iPhone Developer Program
I have a Maven multi-module project and I need two different parent POMs in
I have previously used webdav to access the sent messages on an exchange 2003
There's WM_ACTIVATEAPP message on desktop Windows: Sent when a window belonging to a different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.