Nimbus

Nimbus

  • Docs
  • Getting Started
  • Help

›Clients

Documentation

  • Introduction
  • Deployment

Deploying Resources

  • File Storage Bucket
  • Document Store
  • Key-Value Store
  • Relational Database
  • Functions

    • HTTP Function
    • WebSocket Function
    • Document Store Function
    • Key-Value Store Function
    • Notification Function
    • Queue Function
    • Basic Function
    • File Storage Function
    • After Deployment Function
    • Environment Variables

Clients

  • Document Store Client
  • Key-Value Store Client
  • File Storage Client
  • WebSocket Management Client
  • Basic Serverless Function Client
  • Notification Topic Client
  • Queue Client
  • Relational Database Client
  • Environment Variable Client

Local Deployment

  • Unit Testing
  • Local Server

Queue Client

A queue client allows you to send messages to a queue.

Initialisation

To create a QueueClient the queue id needs to be supplied, corresponding to the queue that you want to send messages to.

QueueClient client = ClientBuilder.getQueueClient(queueId);

Additionally any serverless function that uses a QueueClient must also be annotated with @UsesQueue(queueId). This needs to be given the queue id as well. This gives the function the correct cloud permissions and also will create the queue if it does not exist in the project.

In the above examples queueId should be replaced with the id of your queue.

QueueClient Methods

  • sendMessage(String message) - Pushes the message onto the queue.

  • sendMessageAsJson(Object obj) - Pushes the message onto the queue, serializing into JSON.

Annotation Specification

@UsesQueue

Required Parameters

  • id - The id of the queue the function will interact with.

Optional Parameters

  • stages - The stages that the function will be able to interact with the queue.
← Notification Topic ClientRelational Database Client →
  • Initialisation
  • QueueClient Methods
  • Annotation Specification
    • @UsesQueue
Nimbus
Docs
Getting StartedDocumentation
More
GitHubStar
Copyright © 2019 Thomas Allerton