**Source URL:** https://general.veevavault.dev/safety/vault-sdk/sdk-integrations/spark-messaging/vault-setup.md

# Vault Setup



Spark Messaging utilizes a queue system to handle messages in a First-In, First-Out manner. Each queue must also have a valid *Connection*. Before you can send or receive Spark messages, you must first set up this system in Vault.

### Connections {#Spark_Connections}

A *Connection* holds configuration data necessary for integrations. For example, a *Vault to Vault Connection* contains the remote Vault ID, and an *External Connection* contains the external application’s URL.

Once a connection is established, you can add the *Connection* to a queue to send or receive Spark messages.

Learn more about [setting up connections in Vault Help](https://platform.veevavault.help/en/gr/53358).

### Spark Queues {#spark-queues}

To send Spark messages, you must create an outbound queue with a valid *[Queue Connection](/vault-sdk/sdk-integrations/spark-messaging/vault-setup/#Spark_Connections)*, meaning the queue is properly connected to the message destination. A queue can have multiple *Connections*, which means a single outbound queue can send messages to multiple destinations. For example, a Vault to Vault connection and an external connection can use the same outbound queue to send messages.

To receive Spark messages, you must create an inbound queue with a valid *[Queue Connection](/vault-sdk/sdk-integrations/spark-messaging/vault-setup/#Spark_Connections)*, meaning the queue is properly connected to the message source. A queue can have multiple *Connections*, which means a single inbound queue can receive messages from multiple sources. For example, a Vault to Vault connection and an external connection can send messages to the same inbound queue. Inbound queues also require a *[Spark Message Processor](/vault-sdk/sdk-integrations/spark-messaging/message-processor/#Message_Processor)*, which provides the logic to handle received messages.

Learn more about [setting up queues in Vault Help](https://platform.veevavault.help/en/gr/53147).

Once queues are set up, you can manage your queues through the [Vault UI](https://platform.veevavault.help/en/gr/53147) or the [Vault API](/vault-api/api-reference/26.1/managing-vault-java-sdk/queues). For example, you can check the current status of a queue or disable queue delivery.

To troubleshoot your Spark queue configuration, you can view the *Queue Logs* in **Admin** > **Logs** > **Queue Logs**.



---

**Previous:** [Message Delivery Allowlist](/safety/vault-sdk/sdk-integrations/spark-messaging/message-delivery-allowlist)  
**Next:** [QueueService](/safety/vault-sdk/sdk-integrations/spark-messaging/queue-service)