Skip to content

Commit

Permalink
#26706 changing default pubsub provider (#27117)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyDotcms committed Dec 27, 2023
1 parent 20737bd commit 159b5a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -10,7 +10,7 @@ public class DotPubSubProviderLocator {
public final static String DOT_PUBSUB_PROVIDER_OVERRIDE = "DOT_PUBSUB_PROVIDER_OVERRIDE";
public final static String DOT_PUBSUB_USE_QUEUE = "DOT_PUBSUB_USE_QUEUE";
/**
* Default provider is postgres, can be overriden by setting config: DOT_PUBSUB_PROVIDER_OVERRIDE
* Default provider is JDBCPubSubImpl, can be overriden by setting config: DOT_PUBSUB_PROVIDER_OVERRIDE
* DOT_PUBSUB_USE_QUEUE is a boolean, and will wrap the Pubsub in a queue
*/
public static Lazy<DotPubSubProvider> provider = Lazy.of(() -> {
Expand All @@ -20,9 +20,9 @@ public class DotPubSubProviderLocator {
: Config.getBooleanProperty(DOT_PUBSUB_USE_QUEUE, true);

final String pubsubClazz = System.getProperty(DOT_PUBSUB_PROVIDER_OVERRIDE) != null
? System.getProperty(DOT_PUBSUB_PROVIDER_OVERRIDE)
: Config.getStringProperty(DOT_PUBSUB_PROVIDER_OVERRIDE,
PostgresPubSubImpl.class.getCanonicalName());
? System.getProperty(DOT_PUBSUB_PROVIDER_OVERRIDE)
: Config.getStringProperty(DOT_PUBSUB_PROVIDER_OVERRIDE,
JDBCPubSubImpl.class.getCanonicalName());

DotPubSubProvider provider = (DotPubSubProvider) Try.of(() -> Class.forName(pubsubClazz).newInstance())
.getOrElseThrow(e -> new DotRuntimeException(e));
Expand Down
4 changes: 2 additions & 2 deletions dotCMS/src/main/resources/dotmarketing-config.properties
Expand Up @@ -370,8 +370,8 @@ PULLPERSONALIZED_PERSONA_WEIGHT=100

##################### dotCMS PUB/SUB #####################
## If you want to use a custom DOT_PUBSUB_PROVIDER, you can set the the DOT_PUBSUB_PROVIDER_OVERRIDE
## to the class you would like to use. By default we use the com.dotcms.dotpubsub.PostgresPubSubImpl
#DOT_PUBSUB_PROVIDER_OVERRIDE=com.dotcms.dotpubsub.PostgresPubSubImpl
## to the class you would like to use. By default we use the com.dotcms.dotpubsub.JDBCPubSubImpl
#DOT_PUBSUB_PROVIDER_OVERRIDE=com.dotcms.dotpubsub.JDBCPubSubImpl

## Setting this to true will send all PUB/SUB messages async, through an async queuing mechanism
## Setting this to false will send all PUB/SUB messages sync through the pub/sub system of your choice
Expand Down

0 comments on commit 159b5a2

Please sign in to comment.