Any Framework Configuration
Configuring Connections
For new Connections
"tenant_a_connection": Ecotone\Dbal\DbalConnection::fromDsn(getenv("TENANT_A_DATABASE_URL"));
"tenant_b_connection": Ecotone\Dbal\DbalConnection::fromDsn(getenv("TENANT_B_DATABASE_URL"));final readonly class EcotoneConfiguration
{
#[ServiceContext]
public function multiTenantConfiguration(): MultiTenantConfiguration
{
return MultiTenantConfiguration::create(
tenantHeaderName: 'tenant',
tenantToConnectionMapping: [
'tenant_a' => 'tenant_a_connection',
'tenant_b' => 'tenant_b_connection'
],
);
}
} Sending Message in Context of Tenant
Defining Message Handlers
Last updated
Was this helpful?