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

  • Home
  • SEARCH
  • 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 6248023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:58:53+00:00 2026-05-24T12:58:53+00:00

I need to implement a simple message bus: One process only thus no need

  • 0

I need to implement a simple message bus:

  • One process only thus no need do D-Bus.
  • Publish/subscribe to typed events (Could even be QObjects)

I was thinking of using QSignalMapper to tag the “named events”, then re-emitting from a slot or connecting the publishers signal to the subscriber’s signal…

Any suggestions thoughts? Or should I go for the relatively simple design pattern?

PS: AFAICS for D-Bus on windows you need to install “3rd party” software to get it going with Qt.

  • 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-05-24T12:58:54+00:00Added an answer on May 24, 2026 at 12:58 pm

    Why don’t you just use one dedicated QObject subclass as a message bus? There you define all signals hat might be exchanged over the message bus and you provide corresponding notify methods that emit these signals. Now every component that wants to receive “messages” can connect to the signals of interest.

    If you want a more generic method use the same approach as before. However, the (singleton) QObject subclass now only has a “message(QByteArray)” signal and a “sendMessage(QByteArray)” public method which emits this signal. You might want to declare the send message method as being a slot, too, just in case you want to connect another signal to the send method.

    I use these approaches myself and they work perfecty fine. Even different threads can communicate with each other using this mechanism without any problems. If you use the QByteArray approach you will get something similar to DBus. You serialize and deserialize your messages and automatically make sure all message receivers get their own copy of messages with all the benefits you get if you do parallel calculations.

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

Sidebar

Related Questions

We need to implement a simple state machine in C . Is a standard
I was hoping to implement a simple XMPP server in Java. What I need
I need to implement version control, even for just the developing I do at
Ideally, I only need a simple SSLSocketChannel . I already have a component that
I need to implement a moderately simple Powerpoint-like tool for the web. The user
I need to implement a Diff algorithm in VB.NET to find the changes between
I need to implement a 4-to-1 function in Veriog. The input is 4 bits,
I need to implement auto-capitalization inside of a Telerik RadEditor control on an ASPX
I need to implement an in-memory tuple-of-strings matching feature in C. There will be
I need to implement an OpenID Provider in .Net and wondered....Is there's any OpenSource

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.