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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:54:31+00:00 2026-05-29T07:54:31+00:00

I publish a message in MT which has several Object-typed properties, as I don’t

  • 0

I publish a message in MT which has several Object-typed properties, as I don’t know the type at compile time. When I receive the message in the consumer I see, that the Object-typed properties are populated with Newtonsoft JObject-instances. The JObject-Class resides in the ILMerged Newtonsoft.Json-assembly in Masstransit.dll. The JObject-Class in this assembly is marked internal. Whenever I try to cast the property-value to an JObject provided by a Nuget-Assembly of Newtonsoft.Json it fails.

So my questions are:

  • What is the correct way to cast the property-value to JObject?
  • Why does the cast fail? That means, what are the difficulties the clr has here?
  • Can I get the raw, unserialized message-body in my consumer?

Thank you.

  • 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-29T07:54:32+00:00Added an answer on May 29, 2026 at 7:54 am

    You cannot use JSON serialization if you are doing runtime typing on any message contracts. If you want to do this, you’ll require the use of the binary serializer.

    You cannot access the raw, unserialized message-body; if the message cannot be deserialized, then no user code is called.

    Having any types marked internal will not allow us to deserialize the message. A constructor cannot be called, thus no object creation. I’m not sure the binary serializer will allow you to get around this limitation, not something I’ve tested.

    If you have other questions, you’re welcomed to join the mailing list as well, https://groups.google.com/forum/#!forum/masstransit-discuss.

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

Sidebar

Related Questions

What causes the publish error: fl.getDocumentDOM() has no properties ? The error occurs only
I want to publish message on Facebook's fan page using JAVA/GWT API. Any one
Is the communication bi-directional in NServiceBus ? a subscriber can also publish/send message?
Every time I publish the application in ClickOnce I get get it to update
I want to publish a beta version of my application every time it builds,
i would like to publish/produce a message with some message id, like each message
We have an ASP.NET MVC web app which allows users to publish messages onto
I need to publish a large number of [header only] messages, each of which
I have a WCF Service contract which is basically the Publish Subscriber pattern. The
I was able to setup nginx as a message server for building a real-time

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.