Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ data class SupportedFeatures(
val domainEventsInsights: DomainEventAccessMode = DomainEventAccessMode.NONE,
/* Whether the client supports client status updates .*/
val clientStatusUpdates: Boolean? = false,
/* Whether the application has the entitlement manager configured, allowing it to receive licenses */
val licenseEntitlement: Boolean? = false,
)

data class Versions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ import org.axonframework.conversion.Converter
import org.axonframework.messaging.commandhandling.CommandBus
import org.axonframework.messaging.commandhandling.distributed.PayloadConvertingCommandBusConnector
import org.axonframework.messaging.commandhandling.interception.InterceptingCommandBus
import org.axonframework.messaging.core.MessageDispatchInterceptor
import org.axonframework.messaging.core.MessageHandlerInterceptor
import org.axonframework.messaging.core.SubscribableEventSource
import org.axonframework.messaging.eventhandling.EventSink
import org.axonframework.messaging.eventhandling.processing.EventProcessor
Expand Down Expand Up @@ -83,6 +81,7 @@ class SetupPayloadCreator(
heartbeat = true,
threadDump = true,
clientStatusUpdates = true,
licenseEntitlement = hasEntitlementManager()
)
)
}
Expand Down Expand Up @@ -339,6 +338,18 @@ class SetupPayloadCreator(
))?.javaClass?.simpleName?.let { SerializerInformation(type = it, false) }
}


/**
* Checks whether the PlatformLicenseSource have been configured, in which case we want updates of licenses from Platform.
*/
private fun hasEntitlementManager(): Boolean {
try {
val entitlementManagerClazz = Class.forName("io.axoniq.license.entitlement.source.LicenseSource")
return configuration.getComponents(entitlementManagerClazz).any { it.value::class.java.name == "io.axoniq.license.entitlement.source.PlatformLicenseSource" }
} catch (_: ClassNotFoundException) {
return false
}
}
}


Loading