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.

EmbeddedEventStore Thread Factory

See original GitHub issue

Hi,

we’ve noticed, that the EmbeddedEventStore is fetching events from the store without any transaction. In our case the EmbeddedEventStore is configured with an instance of the NoTransactionManager, what is causing an issue in the underlying Postgres database, because Large Objects may not be used in auto-commit mode.

So we’ve tried to configure the EmbeddedEventStore with a real transaction manager, but the transaction needs to run inside a Java EE managed thread. Unfortunately there is no possibility to configure the thread factory in the EmbeddedEventStore (private final attribute). There is only a hard coded AxonThreadFactory that is assigned to that property in the constructor.

How can we configure the EmbeddedEventStore to create it’s EventProducer threads with a customizable thread factory? Shouldn’t there be a possibility to register a global thread factory for all Axon threads?

Thank you in advance & best regards, Tobias

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
smcvbcommented, Sep 3, 2018

I will make sure this issue is definitely resolved in #754

2reactions
smcvbcommented, Sep 3, 2018

It is a correct assumption that the ThreadFactory should be configurable for the EmbeddedEventStore. We will schedule this work to be performed in the near future. Thanks for providing the thorough ticket description @tgippi, that helps us out a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EmbeddedEventStore.Builder (Axon Framework 4.5.15 API)
Sets the ThreadFactory used to create threads for consuming, producing and cleaning up. Defaults to a AxonThreadFactory with ThreadGroup EmbeddedEventStore.
Read more >
EmbeddedEventStore$EventProducer.<init> - Java - Tabnine
Instantiate a {@link EmbeddedEventStore} based on the fields contained in the {@link Builder}. ... threadFactory); TimeUnit timeUnit = builder.
Read more >
EmbeddedEventStore.java example - Javatips.net
monitor, int cachedEvents, long fetchDelay, long cleanupDelay, TimeUnit timeUnit) { super(storageEngine, monitor); threadFactory = new ...
Read more >
AxonFramework/core/src/main/java/org/axonframework ...
public EmbeddedEventStore(EventStorageEngine storageEngine, MessageMonitor<? super EventMessage<?> ... threadFactory = new AxonThreadFactory(THREAD_GROUP);.
Read more >
spring boot - difference between SimpleCommandBus and ...
The AxonServerCommandBus is a distributed, multi-threaded implementation of the CommandBus interface, using Axon Server as the communication ...
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