Search in sources :

Example 1 with ClusterServices

use of io.camunda.zeebe.broker.clustering.ClusterServices in project zeebe by camunda.

the class GatewayIntegrationTest method setup.

@Before
public void setup() {
    final GatewayCfg configuration = new GatewayCfg();
    final var brokerCfg = broker.getBrokerCfg();
    final var internalApi = brokerCfg.getNetwork().getInternalApi();
    configuration.getCluster().setHost("0.0.0.0").setPort(SocketUtil.getNextAddress().getPort()).setContactPoint(internalApi.toString()).setRequestTimeout(Duration.ofSeconds(10));
    configuration.init();
    final ControlledActorClock clock = new ControlledActorClock();
    final ClusterServices clusterServices = broker.getClusterServices();
    client = new BrokerClientImpl(configuration, clusterServices.getMessagingService(), clusterServices.getMembershipService(), clusterServices.getEventService(), clock);
}
Also used : ControlledActorClock(io.camunda.zeebe.util.sched.clock.ControlledActorClock) ClusterServices(io.camunda.zeebe.broker.clustering.ClusterServices) GatewayCfg(io.camunda.zeebe.gateway.impl.configuration.GatewayCfg) BrokerClientImpl(io.camunda.zeebe.gateway.impl.broker.BrokerClientImpl) Before(org.junit.Before)

Example 2 with ClusterServices

use of io.camunda.zeebe.broker.clustering.ClusterServices in project zeebe by camunda-cloud.

the class GatewayIntegrationTest method setup.

@Before
public void setup() {
    final GatewayCfg configuration = new GatewayCfg();
    final var brokerCfg = broker.getBrokerCfg();
    final var internalApi = brokerCfg.getNetwork().getInternalApi();
    configuration.getCluster().setHost("0.0.0.0").setPort(SocketUtil.getNextAddress().getPort()).setContactPoint(internalApi.toString()).setRequestTimeout(Duration.ofSeconds(10));
    configuration.init();
    final ControlledActorClock clock = new ControlledActorClock();
    final ClusterServices clusterServices = broker.getClusterServices();
    client = new BrokerClientImpl(configuration, clusterServices.getMessagingService(), clusterServices.getMembershipService(), clusterServices.getEventService(), clock);
}
Also used : ControlledActorClock(io.camunda.zeebe.util.sched.clock.ControlledActorClock) ClusterServices(io.camunda.zeebe.broker.clustering.ClusterServices) GatewayCfg(io.camunda.zeebe.gateway.impl.configuration.GatewayCfg) BrokerClientImpl(io.camunda.zeebe.gateway.impl.broker.BrokerClientImpl) Before(org.junit.Before)

Example 3 with ClusterServices

use of io.camunda.zeebe.broker.clustering.ClusterServices in project zeebe by zeebe-io.

the class GatewayIntegrationTest method setup.

@Before
public void setup() {
    final GatewayCfg configuration = new GatewayCfg();
    final var brokerCfg = broker.getBrokerCfg();
    final var internalApi = brokerCfg.getNetwork().getInternalApi();
    configuration.getCluster().setHost("0.0.0.0").setPort(SocketUtil.getNextAddress().getPort()).setContactPoint(internalApi.toString()).setRequestTimeout(Duration.ofSeconds(10));
    configuration.init();
    final ControlledActorClock clock = new ControlledActorClock();
    final ClusterServices clusterServices = broker.getClusterServices();
    client = new BrokerClientImpl(configuration, clusterServices.getMessagingService(), clusterServices.getMembershipService(), clusterServices.getEventService(), clock);
}
Also used : ControlledActorClock(io.camunda.zeebe.util.sched.clock.ControlledActorClock) ClusterServices(io.camunda.zeebe.broker.clustering.ClusterServices) GatewayCfg(io.camunda.zeebe.gateway.impl.configuration.GatewayCfg) BrokerClientImpl(io.camunda.zeebe.gateway.impl.broker.BrokerClientImpl) Before(org.junit.Before)

Aggregations

ClusterServices (io.camunda.zeebe.broker.clustering.ClusterServices)3 BrokerClientImpl (io.camunda.zeebe.gateway.impl.broker.BrokerClientImpl)3 GatewayCfg (io.camunda.zeebe.gateway.impl.configuration.GatewayCfg)3 ControlledActorClock (io.camunda.zeebe.util.sched.clock.ControlledActorClock)3 Before (org.junit.Before)3