question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quartz integration does not work with bus encryption

See original GitHub issue

Hello!

Working on a project with MT 3 and the quartz scheduler, we ran into an issue using the quartz integration piece with encryption.

MassTransit.Pipeline.Filters.RescueReceiveContextFilter<MassTransit.ReceiveContext> Error: 0 : Rescuing exception, System.InvalidOperationException: Only JSON and XML messages can be scheduled 
   at MassTransit.QuartzIntegration.ScheduleMessageConsumer.<CreateJobDetail>d__6.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 
   at MassTransit.QuartzIntegration.ScheduleMessageConsumer.<Consume>d__3.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
   at MassTransit.Pipeline.ConsumerFactories.DelegateConsumerFactory`1.<Send>d__2`1.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
   at MassTransit.Pipeline.Filters.ConsumerMessageFilter`2.<MassTransit-Pipeline-IFilter<MassTransit-ConsumeContext<TMessage>>-Send>d__4.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
   at MassTransit.Pipeline.Filters.ConsumerMessageFilter`2.<MassTransit-Pipeline-IFilter<MassTransit-ConsumeContext<TMessage>>-Send>d__4.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
   at MassTransit.Pipeline.Filters.TeeConsumeFilter`1.<>c__DisplayClass7_0.<<Send>b__0>d.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
   at 

System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
   at MassTransit.Pipeline.Filters.TeeConsumeFilter`1.<Send>d__7.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
   at MassTransit.Pipeline.Filters.MessageConsumeFilter`1.<MassTransit-Pipeline-IFilter<MassTransit-ConsumeContext>-Send>d__7.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
   at MassTransit.Pipeline.Filters.MessageConsumeFilter`1.<MassTransit-Pipeline-IFilter<MassTransit-ConsumeContext>-Send>d__7.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
   at MassTransit.Pipeline.Filters.DeserializeFilter.<Send>d__4.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
   at MassTransit.Pipeline.Filters.RescueReceiveContextFilter`1.<MassTransit-Pipeline-IFilter<MassTransit-ReceiveContext>-Send>d__5.MoveNext()

after looking through the repoI think it’s being thrown here line 55? after looking at the content-type before publish is “application/vnd.masstransit+aes”

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
emirkljucanincommented, Mar 1, 2018

Any new info on this? Is there a proper workaround? We are sending sensitive information over the bus and this actually is stoping us from using encryption. Thank you

0reactions
phatboygcommented, Mar 11, 2016

So yeah, getting the scheduler to work with encrypted messages is going to be complicated, since encrypted messages are binary and we are using a string column in SQL to store the message. There is also some JSON token manipulation happening under the hood to include the original data in the message.

I’m not saying it’s impossible, but I spent an hour or two trying to get it to work and realized that the binary encrypted body is a hard nut to crack.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can QuartzServer NET decrypts connection string in config ...
All works fine. Now I'd like to encrypt the connection string for security reason. Is there a way to let Quartz.Server.exe to understand ......
Read more >
Troubleshooting Quartz Trigger Jobs
The trigger job puts a message on the backbone bus, which is picked up and executed by the ... The Quartz jobs are...
Read more >
Chapter 42. Quartz Red Hat Integration 2023.q2
The component uses either a CronTrigger or a SimpleTrigger . If no cron expression is provided, the component uses a simple trigger. If...
Read more >
Quartz.NET Usage • NServiceBus Samples
This sample illustrates the use of Quartz.NET to send messages from within an NServiceBus endpoint. Quartz.NET is a full-featured, open source ...
Read more >
Quartz Background Worker Manager - ABP Documentation
Quartz is an advanced background worker manager. You can integrate Quartz with the ABP Framework to use it instead of the default background...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found