# Custom Inbound Connector and Correlate throws Exception when set TenantId

**URL:** <https://forum.camunda.io/t/custom-inbound-connector-and-correlate-throws-exception-when-set-tenantid/48390>\
**Category:** Camunda 8 Topics\
**Tags:** connectors, zeebe\
**Created:** [October 24, 2023, 7:39pm UTC](https://forum.camunda.io/t/custom-inbound-connector-and-correlate-throws-exception-when-set-tenantid/48390 "2023-10-24T19:39:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hablocher](https://forum.camunda.io/user_avatar/forum.camunda.io/hablocher/32/26568_2.png) [@hablocher](https://forum.camunda.io/u/hablocher)\
**Post date:** [October 24, 2023, 7:39pm UTC](https://forum.camunda.io/t/custom-inbound-connector-and-correlate-throws-exception-when-set-tenantid/48390/1 "2023-10-24T19:39:14Z")

</div>

Hi folks!

I am getting the following exception when try to correlate

```auto
	at io.camunda.connector.runtime.core.inbound.correlation.InboundCorrelationHandler.triggerStartEvent(InboundCorrelationHandler.java:124)
	at io.camunda.connector.runtime.core.inbound.correlation.InboundCorrelationHandler.correlate(InboundCorrelationHandler.java:64)
	at io.camunda.connector.runtime.core.inbound.correlation.InboundCorrelationHandler.correlate(InboundCorrelationHandler.java:55)
	at io.camunda.connector.runtime.core.inbound.InboundConnectorContextImpl.correlate(InboundConnectorContextImpl.java:66)
	at bpmn.connector.handler.BrokerConnectorHandler.handle(BrokerConnectorHandler.java:38)
	at bpmn.connector.handler.BrokerConnectorHandler.handle(BrokerConnectorHandler.java:19)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:277)
	at io.vertx.core.eventbus.impl.MessageConsumerImpl.dispatch(MessageConsumerImpl.java:177)
	at io.vertx.core.eventbus.impl.HandlerRegistration$InboundDeliveryContext.execute(HandlerRegistration.java:131)
	at io.vertx.core.eventbus.impl.DeliveryContextBase.next(DeliveryContextBase.java:80)
	at io.vertx.core.eventbus.impl.DeliveryContextBase.dispatch(DeliveryContextBase.java:43)
	at io.vertx.core.eventbus.impl.HandlerRegistration.dispatch(HandlerRegistration.java:98)
	at io.vertx.core.eventbus.impl.MessageConsumerImpl.deliver(MessageConsumerImpl.java:183)
	at io.vertx.core.eventbus.impl.MessageConsumerImpl.doReceive(MessageConsumerImpl.java:168)
	at io.vertx.core.eventbus.impl.HandlerRegistration.lambda$receive$0(HandlerRegistration.java:49)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NullPointerException
	at io.camunda.zeebe.gateway.protocol.GatewayOuterClass$CreateProcessInstanceRequest$Builder.setTenantId(GatewayOuterClass.java:9993)
	at io.camunda.zeebe.client.impl.command.CreateProcessInstanceCommandImpl.tenantId(CreateProcessInstanceCommandImpl.java:157)
	at io.camunda.zeebe.client.impl.command.CreateProcessInstanceCommandImpl.tenantId(CreateProcessInstanceCommandImpl.java:39)
	at io.camunda.connector.runtime.core.inbound.correlation.InboundCorrelationHandler.triggerStartEvent(InboundCorrelationHandler.java:111)

```

Scenario:

- Custom inbound connector using Connector SDK 8.3.0
- Runtime running with Quarkus 3.4.2 (base code to create the runtime is the **connector-runtime-spring** project from [GitHub - camunda/connectors: Camunda Connectors](https://github.com/camunda/connectors.git))
- Camunda Docker compose running localy

I just want to know how to setup the tenantId, to avoid this error. Its in ZeebeClient? Or i can setup some env variable in the container running Zeebe?

I see the property tenantId coming null in the InboundConnectorDefinition implementation. I need to create my own?

Thanks for any help!!!

---

<div class="post-metadata">

**Author:** ![mark.farkas](https://forum.camunda.io/user_avatar/forum.camunda.io/mark.farkas/32/25747_2.png) [@mark.farkas](https://forum.camunda.io/u/mark.farkas)\
**Post date:** [October 27, 2023, 9:31am UTC](https://forum.camunda.io/t/custom-inbound-connector-and-correlate-throws-exception-when-set-tenantid/48390/2 "2023-10-27T09:31:47Z")

</div>

Hi @hablocher ,

What is the version of Operate you use? If you wish to have multi-tenancy, you should use Operate version 8.3.0+

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [December 1, 2023, 10:53am UTC](https://forum.camunda.io/t/custom-inbound-connector-and-correlate-throws-exception-when-set-tenantid/48390/3 "2023-12-01T10:53:07Z")

</div>

Closed on December 1, 2023, 10:53am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
