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 813569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:22:55+00:00 2026-05-15T01:22:55+00:00

Does NServiceBus 2.0 allow for defining serializer for given message type? I want for

  • 0

Does NServiceBus 2.0 allow for defining serializer for given message type?

I want for all but one of my messaages to be serialized using XmlSerializer. The remaining one should be serialized using BinarySerializer.

Is it possible with NServiceBus 2.0?

  • 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-15T01:22:55+00:00Added an answer on May 15, 2026 at 1:22 am

    I believe the serializer is specified on an endpoint basis, so all messages using that endpoint would use the same serializer.

    However, if you follow the rote NServiceBus recommendation of one message type per endpoint/queue then you could effectively isolate one message type and use a different serializer for it.

    I’m curious, however, what is special about the one message type that requires binary serialization?

    Edit in response to comment

    The Distributor info indirectly mentions this under Routing with the Distributor. Udi Dahan also frequently advises this in the NServiceBus Yahoo Group although it’s difficult to provide links because the search there is poor.

    Basically, the idea is that you wouldn’t want high priority messages to get stuck behind lower-priority ones, and also that this provides you with the greatest flexibility to scale out certain message processing if necessary.

    Because the MsmqTransportConfig only allows for one InputQueue to be specified, having one message type per queue also means that you only have one message handler per endpoint.

    To address the image, you may still be able to encapsulate it in an XML-formatted message if you encode the byte array as a Base64-encoded string. It’s not ideal, but if your images aren’t too large, it may be easier to do this than to go to the trouble of using a different serializer on only one message type.

    Another option is to store the image data out-of-band in a database or filesystem and then refer to it by an ID or path (respectively).

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

Sidebar

Related Questions

I'm running NServiceBus 3.0.0 rc2 but when I start the application (as local admin)
hey guys, here's a simple scenario NServiceBus Client/Server setup. The Message is a custom
Does anyone know how I can implement a single Touch Event. A simple, one
Does any one have a solution to make the SpecFlow autocomplete in Visual Studio
I'm testing NServiceBus and I've done following scenario: 1) published message to host from
Does anyone have any suggestions for the best / simplest way to view all
Does anyone know how to replace all ocurences of '<\d+' regex with '\r\n<\d+', for
Does doxygen doesn't work properly on python script with a shebang? I tried one
Does NServicebus make sure messages are drawn down from a queue in a particular
Does it possible to access microphone or Webcam using Visual Basic Scripting ? i

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.