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.

publish multiple events from list

See original GitHub issue

I have a list of events var events = new List<IDomainEvent>() { new DomainCreated(), new DomainStateChanged() };

And when I call publish method mb.Publish(events.First());

I get this error: One or more errors occurred. (Message of type IDomainEvent was not registered as a supported produce message. Please check your MessageBus configuration and include this type or one of its base types.) This is because I registered DomainCreated but not IDomainEvent.

So for this kind of problem, I’m using MessageBusProxy.Target.Publish method to pass the type of message. Is there any way to publish message without passing the type? or add a method to IMessageBus class to pass the type?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
zaruszcommented, Jun 10, 2022

@AChehre this should fix the problem: https://www.nuget.org/packages/SlimMessageBus.Host.Kafka/1.18.2-rc1 Please let me know when you have a chance to verify.

I still need to add a few tests and do some more thinking and once this is done I will release a final version (not RC).

0reactions
AChehrecommented, Jun 15, 2022

@AChehre let me know if it worked for you. I would be ready to release a final version.

Sorry for the delay, yes it’s working. tnx.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Split a List into smaller lists before publishing platform events
apex - Split a List into smaller lists before publishing platform events - Salesforce Stack Exchange.
Read more >
Publish multiple events in batches - Acoustic Help Center
Publish events as a compound batch of related events when you can expect multiple events to be initiated by the same individual at...
Read more >
Submit Your Event Once, Publish to Multiple Event Websites
The answer is EventBoost. EventBoost aggregates events and submits them to all of the important event listing websites at once. The websites ...
Read more >
Publish multiple events shares some attributes in one kafka ...
All messages share (id, name, type, date) and may some events have more fields like (course id, course name), so I am intending...
Read more >
Publish multiple events via the UI in List Event · Issue #3476
If you want to publish multiple events at the same time, you can use the API or do you mean something else (or...
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