jetstream.Consumer
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as jetstream from "@pulumi/jetstream";
const oRDERS = new jetstream.Stream("oRDERS", {
subjects: ["ORDERS.*"],
storage: "file",
maxAge: 60 * 60 * 24 * 365,
});
const oRDERSNEW = new jetstream.Consumer("oRDERSNEW", {
streamId: oRDERS.streamId,
durableName: "NEW",
deliverAll: true,
filterSubject: "ORDERS.received",
sampleFreq: 100,
});
import pulumi
import pulumi_jetstream as jetstream
o_rders = jetstream.Stream("oRDERS",
subjects=["ORDERS.*"],
storage="file",
max_age=60 * 60 * 24 * 365)
o_rdersnew = jetstream.Consumer("oRDERSNEW",
stream_id=o_rders.stream_id,
durable_name="NEW",
deliver_all=True,
filter_subject="ORDERS.received",
sample_freq=100)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/jetstream/jetstream"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
oRDERS, err := jetstream.NewStream(ctx, "oRDERS", &jetstream.StreamArgs{
Subjects: pulumi.StringArray{
pulumi.String("ORDERS.*"),
},
Storage: pulumi.String("file"),
MaxAge: 60 * 60 * 24 * 365,
})
if err != nil {
return err
}
_, err = jetstream.NewConsumer(ctx, "oRDERSNEW", &jetstream.ConsumerArgs{
StreamId: oRDERS.StreamId,
DurableName: pulumi.String("NEW"),
DeliverAll: pulumi.Bool(true),
FilterSubject: pulumi.String("ORDERS.received"),
SampleFreq: pulumi.Float64(100),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Jetstream = Pulumi.Jetstream;
return await Deployment.RunAsync(() =>
{
var oRDERS = new Jetstream.Stream("oRDERS", new()
{
Subjects = new[]
{
"ORDERS.*",
},
Storage = "file",
MaxAge = 60 * 60 * 24 * 365,
});
var oRDERSNEW = new Jetstream.Consumer("oRDERSNEW", new()
{
StreamId = oRDERS.StreamId,
DurableName = "NEW",
DeliverAll = true,
FilterSubject = "ORDERS.received",
SampleFreq = 100,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.jetstream.Stream;
import com.pulumi.jetstream.StreamArgs;
import com.pulumi.jetstream.Consumer;
import com.pulumi.jetstream.ConsumerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var oRDERS = new Stream("oRDERS", StreamArgs.builder()
.subjects("ORDERS.*")
.storage("file")
.maxAge(60 * 60 * 24 * 365)
.build());
var oRDERSNEW = new Consumer("oRDERSNEW", ConsumerArgs.builder()
.streamId(oRDERS.streamId())
.durableName("NEW")
.deliverAll(true)
.filterSubject("ORDERS.received")
.sampleFreq(100)
.build());
}
}
Coming soon!
Attribute Reference
description
- (optional) Contains additional information about this consumermetadata
- (optional) A map of strings with arbitrary metadata for the consumerack_policy
- (optional) The delivery acknowledgement policy to apply to the Consumerack_wait
- (optional) Number of seconds to wait for acknowledgementdeliver_all
- (optional) Starts at the first available message in the Streamdeliver_last
- (optional) Starts at the latest available message in the Streamdelivery_subject
- (optional) The subject where a Push-based consumer will deliver messagesdelivery_group
- (optional) When set Push consumers will only deliver messages to subscriptions with this group setdurable_name
- The durable name of the Consumerfilter_subject
- (optional) Only receive a subset of messages from the Stream based on the subject they entered the Stream onfilter_subjects
- (optional) Only receive a subset tof messages from the Stream based on subjects they entered the Stream on. This is exclusive tofilter_subject
. Only works with v2.10 or better.max_delivery
- (optional) Maximum deliveries to attempt for each messagereplay_policy
- (optional) The rate at which messages will be replayed from the streamsample_freq
- (optional) The percentage of acknowledgements that will be sampled for observability purposesstart_time
- (optional) The timestamp of the first message that will be delivered by this Consumerstream_id
- The name of the Stream that this consumer consumesstream_sequence
- (optional) The Stream Sequence that will be the first message delivered by this Consumerratelimit
- (optional) The rate limit for delivering messages to push consumers, expressed in bits per secondheartbeat
- (optional) Enable heartbeat messages for push consumers, duration specified in secondsflow_control
- (optional) Enable flow control for push consumersmax_waiting
- (optional) The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignoredheaders_only
- (optional) When true no message bodies will be delivered only headersmax_batch
- (optional) Limits Pull Batch sizes to this maximummax_bytes
- (optional)The maximum bytes value that maybe set when dong a pull on a Pull Consumermax_expires
- (optional) Limits the Pull Expires duration to this maximum in secondsinactive_threshold
- (optional) Removes the consumer after a idle period, specified as a duration in secondsmax_ack_pending
- (optional) Maximum pending Acks before consumers are pausedreplicas
- (optional) How many replicas of the data to keep in a clustered environmentmemory
- (optional) Force the consumer state to be kept in memory rather than inherit the setting from the streambackoff
- (optional) List of durations in Go format that represents a retry time scale for NaK’d messages. A list of durations in seconds
Create Consumer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Consumer(name: string, args: ConsumerArgs, opts?: CustomResourceOptions);
@overload
def Consumer(resource_name: str,
args: ConsumerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Consumer(resource_name: str,
opts: Optional[ResourceOptions] = None,
durable_name: Optional[str] = None,
stream_id: Optional[str] = None,
heartbeat: Optional[float] = None,
max_ack_pending: Optional[float] = None,
deliver_all: Optional[bool] = None,
deliver_last: Optional[bool] = None,
deliver_last_per_subject: Optional[bool] = None,
deliver_new: Optional[bool] = None,
delivery_group: Optional[str] = None,
delivery_subject: Optional[str] = None,
description: Optional[str] = None,
backoffs: Optional[Sequence[float]] = None,
filter_subject: Optional[str] = None,
filter_subjects: Optional[Sequence[str]] = None,
flow_control: Optional[bool] = None,
headers_only: Optional[bool] = None,
consumer_id: Optional[str] = None,
ack_policy: Optional[str] = None,
max_bytes: Optional[float] = None,
max_batch: Optional[float] = None,
inactive_threshold: Optional[float] = None,
max_delivery: Optional[float] = None,
max_expires: Optional[float] = None,
max_waiting: Optional[float] = None,
memory: Optional[bool] = None,
metadata: Optional[Mapping[str, str]] = None,
ratelimit: Optional[float] = None,
replay_policy: Optional[str] = None,
replicas: Optional[float] = None,
sample_freq: Optional[float] = None,
start_time: Optional[str] = None,
ack_wait: Optional[float] = None,
stream_sequence: Optional[float] = None)
func NewConsumer(ctx *Context, name string, args ConsumerArgs, opts ...ResourceOption) (*Consumer, error)
public Consumer(string name, ConsumerArgs args, CustomResourceOptions? opts = null)
public Consumer(String name, ConsumerArgs args)
public Consumer(String name, ConsumerArgs args, CustomResourceOptions options)
type: jetstream:Consumer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ConsumerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ConsumerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ConsumerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConsumerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConsumerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var consumerResource = new Jetstream.Consumer("consumerResource", new()
{
DurableName = "string",
StreamId = "string",
Heartbeat = 0,
MaxAckPending = 0,
DeliverAll = false,
DeliverLast = false,
DeliverLastPerSubject = false,
DeliverNew = false,
DeliveryGroup = "string",
DeliverySubject = "string",
Description = "string",
Backoffs = new[]
{
0,
},
FilterSubject = "string",
FilterSubjects = new[]
{
"string",
},
FlowControl = false,
HeadersOnly = false,
ConsumerId = "string",
AckPolicy = "string",
MaxBytes = 0,
MaxBatch = 0,
InactiveThreshold = 0,
MaxDelivery = 0,
MaxExpires = 0,
MaxWaiting = 0,
Memory = false,
Metadata =
{
{ "string", "string" },
},
Ratelimit = 0,
ReplayPolicy = "string",
Replicas = 0,
SampleFreq = 0,
StartTime = "string",
AckWait = 0,
StreamSequence = 0,
});
example, err := jetstream.NewConsumer(ctx, "consumerResource", &jetstream.ConsumerArgs{
DurableName: pulumi.String("string"),
StreamId: pulumi.String("string"),
Heartbeat: pulumi.Float64(0),
MaxAckPending: pulumi.Float64(0),
DeliverAll: pulumi.Bool(false),
DeliverLast: pulumi.Bool(false),
DeliverLastPerSubject: pulumi.Bool(false),
DeliverNew: pulumi.Bool(false),
DeliveryGroup: pulumi.String("string"),
DeliverySubject: pulumi.String("string"),
Description: pulumi.String("string"),
Backoffs: pulumi.Float64Array{
pulumi.Float64(0),
},
FilterSubject: pulumi.String("string"),
FilterSubjects: pulumi.StringArray{
pulumi.String("string"),
},
FlowControl: pulumi.Bool(false),
HeadersOnly: pulumi.Bool(false),
ConsumerId: pulumi.String("string"),
AckPolicy: pulumi.String("string"),
MaxBytes: pulumi.Float64(0),
MaxBatch: pulumi.Float64(0),
InactiveThreshold: pulumi.Float64(0),
MaxDelivery: pulumi.Float64(0),
MaxExpires: pulumi.Float64(0),
MaxWaiting: pulumi.Float64(0),
Memory: pulumi.Bool(false),
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
Ratelimit: pulumi.Float64(0),
ReplayPolicy: pulumi.String("string"),
Replicas: pulumi.Float64(0),
SampleFreq: pulumi.Float64(0),
StartTime: pulumi.String("string"),
AckWait: pulumi.Float64(0),
StreamSequence: pulumi.Float64(0),
})
var consumerResource = new Consumer("consumerResource", ConsumerArgs.builder()
.durableName("string")
.streamId("string")
.heartbeat(0)
.maxAckPending(0)
.deliverAll(false)
.deliverLast(false)
.deliverLastPerSubject(false)
.deliverNew(false)
.deliveryGroup("string")
.deliverySubject("string")
.description("string")
.backoffs(0)
.filterSubject("string")
.filterSubjects("string")
.flowControl(false)
.headersOnly(false)
.consumerId("string")
.ackPolicy("string")
.maxBytes(0)
.maxBatch(0)
.inactiveThreshold(0)
.maxDelivery(0)
.maxExpires(0)
.maxWaiting(0)
.memory(false)
.metadata(Map.of("string", "string"))
.ratelimit(0)
.replayPolicy("string")
.replicas(0)
.sampleFreq(0)
.startTime("string")
.ackWait(0)
.streamSequence(0)
.build());
consumer_resource = jetstream.Consumer("consumerResource",
durable_name="string",
stream_id="string",
heartbeat=0,
max_ack_pending=0,
deliver_all=False,
deliver_last=False,
deliver_last_per_subject=False,
deliver_new=False,
delivery_group="string",
delivery_subject="string",
description="string",
backoffs=[0],
filter_subject="string",
filter_subjects=["string"],
flow_control=False,
headers_only=False,
consumer_id="string",
ack_policy="string",
max_bytes=0,
max_batch=0,
inactive_threshold=0,
max_delivery=0,
max_expires=0,
max_waiting=0,
memory=False,
metadata={
"string": "string",
},
ratelimit=0,
replay_policy="string",
replicas=0,
sample_freq=0,
start_time="string",
ack_wait=0,
stream_sequence=0)
const consumerResource = new jetstream.Consumer("consumerResource", {
durableName: "string",
streamId: "string",
heartbeat: 0,
maxAckPending: 0,
deliverAll: false,
deliverLast: false,
deliverLastPerSubject: false,
deliverNew: false,
deliveryGroup: "string",
deliverySubject: "string",
description: "string",
backoffs: [0],
filterSubject: "string",
filterSubjects: ["string"],
flowControl: false,
headersOnly: false,
consumerId: "string",
ackPolicy: "string",
maxBytes: 0,
maxBatch: 0,
inactiveThreshold: 0,
maxDelivery: 0,
maxExpires: 0,
maxWaiting: 0,
memory: false,
metadata: {
string: "string",
},
ratelimit: 0,
replayPolicy: "string",
replicas: 0,
sampleFreq: 0,
startTime: "string",
ackWait: 0,
streamSequence: 0,
});
type: jetstream:Consumer
properties:
ackPolicy: string
ackWait: 0
backoffs:
- 0
consumerId: string
deliverAll: false
deliverLast: false
deliverLastPerSubject: false
deliverNew: false
deliveryGroup: string
deliverySubject: string
description: string
durableName: string
filterSubject: string
filterSubjects:
- string
flowControl: false
headersOnly: false
heartbeat: 0
inactiveThreshold: 0
maxAckPending: 0
maxBatch: 0
maxBytes: 0
maxDelivery: 0
maxExpires: 0
maxWaiting: 0
memory: false
metadata:
string: string
ratelimit: 0
replayPolicy: string
replicas: 0
sampleFreq: 0
startTime: string
streamId: string
streamSequence: 0
Consumer Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Consumer resource accepts the following input properties:
- Durable
Name string - The durable name of the Consumer
- Stream
Id string - The name of the Stream that this consumer consumes
- Ack
Policy string - The delivery acknowledgement policy to apply to the Consumer
- Ack
Wait double - Number of seconds to wait for acknowledgement
- Backoffs List<double>
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- Consumer
Id string - Deliver
All bool - Starts at the first available message in the Stream
- Deliver
Last bool - Starts at the latest available message in the Stream
- Deliver
Last boolPer Subject - Starts with the last message for each subject matched by filter
- Deliver
New bool - Starts with the next available message in the Stream
- Delivery
Group string - When set Push consumers will only deliver messages to subscriptions with this group set
- Delivery
Subject string - The subject where a Push-based consumer will deliver messages
- Description string
- Contains additional information about this consumer
- Filter
Subject string - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- Filter
Subjects List<string> - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- Flow
Control bool - Enable flow control for push consumers
- Headers
Only bool - When true no message bodies will be delivered only headers
- Heartbeat double
- Enable heartbeat messages for push consumers, duration specified in seconds
- Inactive
Threshold double - Removes the consumer after a idle period, specified as a duration in seconds
- Max
Ack doublePending - Maximum pending Acks before consumers are paused
- Max
Batch double - Limits Pull Batch sizes to this maximum
- Max
Bytes double - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- Max
Delivery double - Maximum deliveries to attempt for each message
- Max
Expires double - Limits the Pull Expires duration to this maximum in seconds
- Max
Waiting double - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- Memory bool
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- Metadata Dictionary<string, string>
- Free form metadata about the consumer
- Ratelimit double
- The rate limit for delivering messages to push consumers, expressed in bits per second
- Replay
Policy string - The rate at which messages will be replayed from the stream
- Replicas double
- How many replicas of the data to keep in a clustered environment
- Sample
Freq double - The percentage of acknowledgements that will be sampled for observability purposes
- Start
Time string - The timestamp of the first message that will be delivered by this Consumer
- Stream
Sequence double - The Stream Sequence that will be the first message delivered by this Consumer
- Durable
Name string - The durable name of the Consumer
- Stream
Id string - The name of the Stream that this consumer consumes
- Ack
Policy string - The delivery acknowledgement policy to apply to the Consumer
- Ack
Wait float64 - Number of seconds to wait for acknowledgement
- Backoffs []float64
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- Consumer
Id string - Deliver
All bool - Starts at the first available message in the Stream
- Deliver
Last bool - Starts at the latest available message in the Stream
- Deliver
Last boolPer Subject - Starts with the last message for each subject matched by filter
- Deliver
New bool - Starts with the next available message in the Stream
- Delivery
Group string - When set Push consumers will only deliver messages to subscriptions with this group set
- Delivery
Subject string - The subject where a Push-based consumer will deliver messages
- Description string
- Contains additional information about this consumer
- Filter
Subject string - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- Filter
Subjects []string - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- Flow
Control bool - Enable flow control for push consumers
- Headers
Only bool - When true no message bodies will be delivered only headers
- Heartbeat float64
- Enable heartbeat messages for push consumers, duration specified in seconds
- Inactive
Threshold float64 - Removes the consumer after a idle period, specified as a duration in seconds
- Max
Ack float64Pending - Maximum pending Acks before consumers are paused
- Max
Batch float64 - Limits Pull Batch sizes to this maximum
- Max
Bytes float64 - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- Max
Delivery float64 - Maximum deliveries to attempt for each message
- Max
Expires float64 - Limits the Pull Expires duration to this maximum in seconds
- Max
Waiting float64 - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- Memory bool
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- Metadata map[string]string
- Free form metadata about the consumer
- Ratelimit float64
- The rate limit for delivering messages to push consumers, expressed in bits per second
- Replay
Policy string - The rate at which messages will be replayed from the stream
- Replicas float64
- How many replicas of the data to keep in a clustered environment
- Sample
Freq float64 - The percentage of acknowledgements that will be sampled for observability purposes
- Start
Time string - The timestamp of the first message that will be delivered by this Consumer
- Stream
Sequence float64 - The Stream Sequence that will be the first message delivered by this Consumer
- durable
Name String - The durable name of the Consumer
- stream
Id String - The name of the Stream that this consumer consumes
- ack
Policy String - The delivery acknowledgement policy to apply to the Consumer
- ack
Wait Double - Number of seconds to wait for acknowledgement
- backoffs List<Double>
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- consumer
Id String - deliver
All Boolean - Starts at the first available message in the Stream
- deliver
Last Boolean - Starts at the latest available message in the Stream
- deliver
Last BooleanPer Subject - Starts with the last message for each subject matched by filter
- deliver
New Boolean - Starts with the next available message in the Stream
- delivery
Group String - When set Push consumers will only deliver messages to subscriptions with this group set
- delivery
Subject String - The subject where a Push-based consumer will deliver messages
- description String
- Contains additional information about this consumer
- filter
Subject String - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- filter
Subjects List<String> - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- flow
Control Boolean - Enable flow control for push consumers
- headers
Only Boolean - When true no message bodies will be delivered only headers
- heartbeat Double
- Enable heartbeat messages for push consumers, duration specified in seconds
- inactive
Threshold Double - Removes the consumer after a idle period, specified as a duration in seconds
- max
Ack DoublePending - Maximum pending Acks before consumers are paused
- max
Batch Double - Limits Pull Batch sizes to this maximum
- max
Bytes Double - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- max
Delivery Double - Maximum deliveries to attempt for each message
- max
Expires Double - Limits the Pull Expires duration to this maximum in seconds
- max
Waiting Double - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- memory Boolean
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- metadata Map<String,String>
- Free form metadata about the consumer
- ratelimit Double
- The rate limit for delivering messages to push consumers, expressed in bits per second
- replay
Policy String - The rate at which messages will be replayed from the stream
- replicas Double
- How many replicas of the data to keep in a clustered environment
- sample
Freq Double - The percentage of acknowledgements that will be sampled for observability purposes
- start
Time String - The timestamp of the first message that will be delivered by this Consumer
- stream
Sequence Double - The Stream Sequence that will be the first message delivered by this Consumer
- durable
Name string - The durable name of the Consumer
- stream
Id string - The name of the Stream that this consumer consumes
- ack
Policy string - The delivery acknowledgement policy to apply to the Consumer
- ack
Wait number - Number of seconds to wait for acknowledgement
- backoffs number[]
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- consumer
Id string - deliver
All boolean - Starts at the first available message in the Stream
- deliver
Last boolean - Starts at the latest available message in the Stream
- deliver
Last booleanPer Subject - Starts with the last message for each subject matched by filter
- deliver
New boolean - Starts with the next available message in the Stream
- delivery
Group string - When set Push consumers will only deliver messages to subscriptions with this group set
- delivery
Subject string - The subject where a Push-based consumer will deliver messages
- description string
- Contains additional information about this consumer
- filter
Subject string - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- filter
Subjects string[] - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- flow
Control boolean - Enable flow control for push consumers
- headers
Only boolean - When true no message bodies will be delivered only headers
- heartbeat number
- Enable heartbeat messages for push consumers, duration specified in seconds
- inactive
Threshold number - Removes the consumer after a idle period, specified as a duration in seconds
- max
Ack numberPending - Maximum pending Acks before consumers are paused
- max
Batch number - Limits Pull Batch sizes to this maximum
- max
Bytes number - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- max
Delivery number - Maximum deliveries to attempt for each message
- max
Expires number - Limits the Pull Expires duration to this maximum in seconds
- max
Waiting number - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- memory boolean
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- metadata {[key: string]: string}
- Free form metadata about the consumer
- ratelimit number
- The rate limit for delivering messages to push consumers, expressed in bits per second
- replay
Policy string - The rate at which messages will be replayed from the stream
- replicas number
- How many replicas of the data to keep in a clustered environment
- sample
Freq number - The percentage of acknowledgements that will be sampled for observability purposes
- start
Time string - The timestamp of the first message that will be delivered by this Consumer
- stream
Sequence number - The Stream Sequence that will be the first message delivered by this Consumer
- durable_
name str - The durable name of the Consumer
- stream_
id str - The name of the Stream that this consumer consumes
- ack_
policy str - The delivery acknowledgement policy to apply to the Consumer
- ack_
wait float - Number of seconds to wait for acknowledgement
- backoffs Sequence[float]
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- consumer_
id str - deliver_
all bool - Starts at the first available message in the Stream
- deliver_
last bool - Starts at the latest available message in the Stream
- deliver_
last_ boolper_ subject - Starts with the last message for each subject matched by filter
- deliver_
new bool - Starts with the next available message in the Stream
- delivery_
group str - When set Push consumers will only deliver messages to subscriptions with this group set
- delivery_
subject str - The subject where a Push-based consumer will deliver messages
- description str
- Contains additional information about this consumer
- filter_
subject str - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- filter_
subjects Sequence[str] - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- flow_
control bool - Enable flow control for push consumers
- headers_
only bool - When true no message bodies will be delivered only headers
- heartbeat float
- Enable heartbeat messages for push consumers, duration specified in seconds
- inactive_
threshold float - Removes the consumer after a idle period, specified as a duration in seconds
- max_
ack_ floatpending - Maximum pending Acks before consumers are paused
- max_
batch float - Limits Pull Batch sizes to this maximum
- max_
bytes float - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- max_
delivery float - Maximum deliveries to attempt for each message
- max_
expires float - Limits the Pull Expires duration to this maximum in seconds
- max_
waiting float - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- memory bool
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- metadata Mapping[str, str]
- Free form metadata about the consumer
- ratelimit float
- The rate limit for delivering messages to push consumers, expressed in bits per second
- replay_
policy str - The rate at which messages will be replayed from the stream
- replicas float
- How many replicas of the data to keep in a clustered environment
- sample_
freq float - The percentage of acknowledgements that will be sampled for observability purposes
- start_
time str - The timestamp of the first message that will be delivered by this Consumer
- stream_
sequence float - The Stream Sequence that will be the first message delivered by this Consumer
- durable
Name String - The durable name of the Consumer
- stream
Id String - The name of the Stream that this consumer consumes
- ack
Policy String - The delivery acknowledgement policy to apply to the Consumer
- ack
Wait Number - Number of seconds to wait for acknowledgement
- backoffs List<Number>
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- consumer
Id String - deliver
All Boolean - Starts at the first available message in the Stream
- deliver
Last Boolean - Starts at the latest available message in the Stream
- deliver
Last BooleanPer Subject - Starts with the last message for each subject matched by filter
- deliver
New Boolean - Starts with the next available message in the Stream
- delivery
Group String - When set Push consumers will only deliver messages to subscriptions with this group set
- delivery
Subject String - The subject where a Push-based consumer will deliver messages
- description String
- Contains additional information about this consumer
- filter
Subject String - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- filter
Subjects List<String> - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- flow
Control Boolean - Enable flow control for push consumers
- headers
Only Boolean - When true no message bodies will be delivered only headers
- heartbeat Number
- Enable heartbeat messages for push consumers, duration specified in seconds
- inactive
Threshold Number - Removes the consumer after a idle period, specified as a duration in seconds
- max
Ack NumberPending - Maximum pending Acks before consumers are paused
- max
Batch Number - Limits Pull Batch sizes to this maximum
- max
Bytes Number - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- max
Delivery Number - Maximum deliveries to attempt for each message
- max
Expires Number - Limits the Pull Expires duration to this maximum in seconds
- max
Waiting Number - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- memory Boolean
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- metadata Map<String>
- Free form metadata about the consumer
- ratelimit Number
- The rate limit for delivering messages to push consumers, expressed in bits per second
- replay
Policy String - The rate at which messages will be replayed from the stream
- replicas Number
- How many replicas of the data to keep in a clustered environment
- sample
Freq Number - The percentage of acknowledgements that will be sampled for observability purposes
- start
Time String - The timestamp of the first message that will be delivered by this Consumer
- stream
Sequence Number - The Stream Sequence that will be the first message delivered by this Consumer
Outputs
All input properties are implicitly available as output properties. Additionally, the Consumer resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Consumer Resource
Get an existing Consumer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ConsumerState, opts?: CustomResourceOptions): Consumer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ack_policy: Optional[str] = None,
ack_wait: Optional[float] = None,
backoffs: Optional[Sequence[float]] = None,
consumer_id: Optional[str] = None,
deliver_all: Optional[bool] = None,
deliver_last: Optional[bool] = None,
deliver_last_per_subject: Optional[bool] = None,
deliver_new: Optional[bool] = None,
delivery_group: Optional[str] = None,
delivery_subject: Optional[str] = None,
description: Optional[str] = None,
durable_name: Optional[str] = None,
filter_subject: Optional[str] = None,
filter_subjects: Optional[Sequence[str]] = None,
flow_control: Optional[bool] = None,
headers_only: Optional[bool] = None,
heartbeat: Optional[float] = None,
inactive_threshold: Optional[float] = None,
max_ack_pending: Optional[float] = None,
max_batch: Optional[float] = None,
max_bytes: Optional[float] = None,
max_delivery: Optional[float] = None,
max_expires: Optional[float] = None,
max_waiting: Optional[float] = None,
memory: Optional[bool] = None,
metadata: Optional[Mapping[str, str]] = None,
ratelimit: Optional[float] = None,
replay_policy: Optional[str] = None,
replicas: Optional[float] = None,
sample_freq: Optional[float] = None,
start_time: Optional[str] = None,
stream_id: Optional[str] = None,
stream_sequence: Optional[float] = None) -> Consumer
func GetConsumer(ctx *Context, name string, id IDInput, state *ConsumerState, opts ...ResourceOption) (*Consumer, error)
public static Consumer Get(string name, Input<string> id, ConsumerState? state, CustomResourceOptions? opts = null)
public static Consumer get(String name, Output<String> id, ConsumerState state, CustomResourceOptions options)
resources: _: type: jetstream:Consumer get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Ack
Policy string - The delivery acknowledgement policy to apply to the Consumer
- Ack
Wait double - Number of seconds to wait for acknowledgement
- Backoffs List<double>
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- Consumer
Id string - Deliver
All bool - Starts at the first available message in the Stream
- Deliver
Last bool - Starts at the latest available message in the Stream
- Deliver
Last boolPer Subject - Starts with the last message for each subject matched by filter
- Deliver
New bool - Starts with the next available message in the Stream
- Delivery
Group string - When set Push consumers will only deliver messages to subscriptions with this group set
- Delivery
Subject string - The subject where a Push-based consumer will deliver messages
- Description string
- Contains additional information about this consumer
- Durable
Name string - The durable name of the Consumer
- Filter
Subject string - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- Filter
Subjects List<string> - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- Flow
Control bool - Enable flow control for push consumers
- Headers
Only bool - When true no message bodies will be delivered only headers
- Heartbeat double
- Enable heartbeat messages for push consumers, duration specified in seconds
- Inactive
Threshold double - Removes the consumer after a idle period, specified as a duration in seconds
- Max
Ack doublePending - Maximum pending Acks before consumers are paused
- Max
Batch double - Limits Pull Batch sizes to this maximum
- Max
Bytes double - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- Max
Delivery double - Maximum deliveries to attempt for each message
- Max
Expires double - Limits the Pull Expires duration to this maximum in seconds
- Max
Waiting double - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- Memory bool
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- Metadata Dictionary<string, string>
- Free form metadata about the consumer
- Ratelimit double
- The rate limit for delivering messages to push consumers, expressed in bits per second
- Replay
Policy string - The rate at which messages will be replayed from the stream
- Replicas double
- How many replicas of the data to keep in a clustered environment
- Sample
Freq double - The percentage of acknowledgements that will be sampled for observability purposes
- Start
Time string - The timestamp of the first message that will be delivered by this Consumer
- Stream
Id string - The name of the Stream that this consumer consumes
- Stream
Sequence double - The Stream Sequence that will be the first message delivered by this Consumer
- Ack
Policy string - The delivery acknowledgement policy to apply to the Consumer
- Ack
Wait float64 - Number of seconds to wait for acknowledgement
- Backoffs []float64
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- Consumer
Id string - Deliver
All bool - Starts at the first available message in the Stream
- Deliver
Last bool - Starts at the latest available message in the Stream
- Deliver
Last boolPer Subject - Starts with the last message for each subject matched by filter
- Deliver
New bool - Starts with the next available message in the Stream
- Delivery
Group string - When set Push consumers will only deliver messages to subscriptions with this group set
- Delivery
Subject string - The subject where a Push-based consumer will deliver messages
- Description string
- Contains additional information about this consumer
- Durable
Name string - The durable name of the Consumer
- Filter
Subject string - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- Filter
Subjects []string - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- Flow
Control bool - Enable flow control for push consumers
- Headers
Only bool - When true no message bodies will be delivered only headers
- Heartbeat float64
- Enable heartbeat messages for push consumers, duration specified in seconds
- Inactive
Threshold float64 - Removes the consumer after a idle period, specified as a duration in seconds
- Max
Ack float64Pending - Maximum pending Acks before consumers are paused
- Max
Batch float64 - Limits Pull Batch sizes to this maximum
- Max
Bytes float64 - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- Max
Delivery float64 - Maximum deliveries to attempt for each message
- Max
Expires float64 - Limits the Pull Expires duration to this maximum in seconds
- Max
Waiting float64 - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- Memory bool
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- Metadata map[string]string
- Free form metadata about the consumer
- Ratelimit float64
- The rate limit for delivering messages to push consumers, expressed in bits per second
- Replay
Policy string - The rate at which messages will be replayed from the stream
- Replicas float64
- How many replicas of the data to keep in a clustered environment
- Sample
Freq float64 - The percentage of acknowledgements that will be sampled for observability purposes
- Start
Time string - The timestamp of the first message that will be delivered by this Consumer
- Stream
Id string - The name of the Stream that this consumer consumes
- Stream
Sequence float64 - The Stream Sequence that will be the first message delivered by this Consumer
- ack
Policy String - The delivery acknowledgement policy to apply to the Consumer
- ack
Wait Double - Number of seconds to wait for acknowledgement
- backoffs List<Double>
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- consumer
Id String - deliver
All Boolean - Starts at the first available message in the Stream
- deliver
Last Boolean - Starts at the latest available message in the Stream
- deliver
Last BooleanPer Subject - Starts with the last message for each subject matched by filter
- deliver
New Boolean - Starts with the next available message in the Stream
- delivery
Group String - When set Push consumers will only deliver messages to subscriptions with this group set
- delivery
Subject String - The subject where a Push-based consumer will deliver messages
- description String
- Contains additional information about this consumer
- durable
Name String - The durable name of the Consumer
- filter
Subject String - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- filter
Subjects List<String> - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- flow
Control Boolean - Enable flow control for push consumers
- headers
Only Boolean - When true no message bodies will be delivered only headers
- heartbeat Double
- Enable heartbeat messages for push consumers, duration specified in seconds
- inactive
Threshold Double - Removes the consumer after a idle period, specified as a duration in seconds
- max
Ack DoublePending - Maximum pending Acks before consumers are paused
- max
Batch Double - Limits Pull Batch sizes to this maximum
- max
Bytes Double - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- max
Delivery Double - Maximum deliveries to attempt for each message
- max
Expires Double - Limits the Pull Expires duration to this maximum in seconds
- max
Waiting Double - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- memory Boolean
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- metadata Map<String,String>
- Free form metadata about the consumer
- ratelimit Double
- The rate limit for delivering messages to push consumers, expressed in bits per second
- replay
Policy String - The rate at which messages will be replayed from the stream
- replicas Double
- How many replicas of the data to keep in a clustered environment
- sample
Freq Double - The percentage of acknowledgements that will be sampled for observability purposes
- start
Time String - The timestamp of the first message that will be delivered by this Consumer
- stream
Id String - The name of the Stream that this consumer consumes
- stream
Sequence Double - The Stream Sequence that will be the first message delivered by this Consumer
- ack
Policy string - The delivery acknowledgement policy to apply to the Consumer
- ack
Wait number - Number of seconds to wait for acknowledgement
- backoffs number[]
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- consumer
Id string - deliver
All boolean - Starts at the first available message in the Stream
- deliver
Last boolean - Starts at the latest available message in the Stream
- deliver
Last booleanPer Subject - Starts with the last message for each subject matched by filter
- deliver
New boolean - Starts with the next available message in the Stream
- delivery
Group string - When set Push consumers will only deliver messages to subscriptions with this group set
- delivery
Subject string - The subject where a Push-based consumer will deliver messages
- description string
- Contains additional information about this consumer
- durable
Name string - The durable name of the Consumer
- filter
Subject string - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- filter
Subjects string[] - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- flow
Control boolean - Enable flow control for push consumers
- headers
Only boolean - When true no message bodies will be delivered only headers
- heartbeat number
- Enable heartbeat messages for push consumers, duration specified in seconds
- inactive
Threshold number - Removes the consumer after a idle period, specified as a duration in seconds
- max
Ack numberPending - Maximum pending Acks before consumers are paused
- max
Batch number - Limits Pull Batch sizes to this maximum
- max
Bytes number - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- max
Delivery number - Maximum deliveries to attempt for each message
- max
Expires number - Limits the Pull Expires duration to this maximum in seconds
- max
Waiting number - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- memory boolean
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- metadata {[key: string]: string}
- Free form metadata about the consumer
- ratelimit number
- The rate limit for delivering messages to push consumers, expressed in bits per second
- replay
Policy string - The rate at which messages will be replayed from the stream
- replicas number
- How many replicas of the data to keep in a clustered environment
- sample
Freq number - The percentage of acknowledgements that will be sampled for observability purposes
- start
Time string - The timestamp of the first message that will be delivered by this Consumer
- stream
Id string - The name of the Stream that this consumer consumes
- stream
Sequence number - The Stream Sequence that will be the first message delivered by this Consumer
- ack_
policy str - The delivery acknowledgement policy to apply to the Consumer
- ack_
wait float - Number of seconds to wait for acknowledgement
- backoffs Sequence[float]
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- consumer_
id str - deliver_
all bool - Starts at the first available message in the Stream
- deliver_
last bool - Starts at the latest available message in the Stream
- deliver_
last_ boolper_ subject - Starts with the last message for each subject matched by filter
- deliver_
new bool - Starts with the next available message in the Stream
- delivery_
group str - When set Push consumers will only deliver messages to subscriptions with this group set
- delivery_
subject str - The subject where a Push-based consumer will deliver messages
- description str
- Contains additional information about this consumer
- durable_
name str - The durable name of the Consumer
- filter_
subject str - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- filter_
subjects Sequence[str] - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- flow_
control bool - Enable flow control for push consumers
- headers_
only bool - When true no message bodies will be delivered only headers
- heartbeat float
- Enable heartbeat messages for push consumers, duration specified in seconds
- inactive_
threshold float - Removes the consumer after a idle period, specified as a duration in seconds
- max_
ack_ floatpending - Maximum pending Acks before consumers are paused
- max_
batch float - Limits Pull Batch sizes to this maximum
- max_
bytes float - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- max_
delivery float - Maximum deliveries to attempt for each message
- max_
expires float - Limits the Pull Expires duration to this maximum in seconds
- max_
waiting float - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- memory bool
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- metadata Mapping[str, str]
- Free form metadata about the consumer
- ratelimit float
- The rate limit for delivering messages to push consumers, expressed in bits per second
- replay_
policy str - The rate at which messages will be replayed from the stream
- replicas float
- How many replicas of the data to keep in a clustered environment
- sample_
freq float - The percentage of acknowledgements that will be sampled for observability purposes
- start_
time str - The timestamp of the first message that will be delivered by this Consumer
- stream_
id str - The name of the Stream that this consumer consumes
- stream_
sequence float - The Stream Sequence that will be the first message delivered by this Consumer
- ack
Policy String - The delivery acknowledgement policy to apply to the Consumer
- ack
Wait Number - Number of seconds to wait for acknowledgement
- backoffs List<Number>
- List of durations in Go format that represents a retry time scale for NaK'd messages. A list of durations in seconds.
- consumer
Id String - deliver
All Boolean - Starts at the first available message in the Stream
- deliver
Last Boolean - Starts at the latest available message in the Stream
- deliver
Last BooleanPer Subject - Starts with the last message for each subject matched by filter
- deliver
New Boolean - Starts with the next available message in the Stream
- delivery
Group String - When set Push consumers will only deliver messages to subscriptions with this group set
- delivery
Subject String - The subject where a Push-based consumer will deliver messages
- description String
- Contains additional information about this consumer
- durable
Name String - The durable name of the Consumer
- filter
Subject String - Only receive a subset of messages from the Stream based on the subject they entered the Stream on
- filter
Subjects List<String> - Only receive a subset of messages from the stream baseed on the subjects they entered the Streeam on, exlusive to filter_subject and works with nats-server v2.10 or better
- flow
Control Boolean - Enable flow control for push consumers
- headers
Only Boolean - When true no message bodies will be delivered only headers
- heartbeat Number
- Enable heartbeat messages for push consumers, duration specified in seconds
- inactive
Threshold Number - Removes the consumer after a idle period, specified as a duration in seconds
- max
Ack NumberPending - Maximum pending Acks before consumers are paused
- max
Batch Number - Limits Pull Batch sizes to this maximum
- max
Bytes Number - The maximum bytes value that maybe set when dong a pull on a Pull Consumer
- max
Delivery Number - Maximum deliveries to attempt for each message
- max
Expires Number - Limits the Pull Expires duration to this maximum in seconds
- max
Waiting Number - The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored
- memory Boolean
- Force the consumer state to be kept in memory rather than inherit the setting from the stream
- metadata Map<String>
- Free form metadata about the consumer
- ratelimit Number
- The rate limit for delivering messages to push consumers, expressed in bits per second
- replay
Policy String - The rate at which messages will be replayed from the stream
- replicas Number
- How many replicas of the data to keep in a clustered environment
- sample
Freq Number - The percentage of acknowledgements that will be sampled for observability purposes
- start
Time String - The timestamp of the first message that will be delivered by this Consumer
- stream
Id String - The name of the Stream that this consumer consumes
- stream
Sequence Number - The Stream Sequence that will be the first message delivered by this Consumer
Package Details
- Repository
- jetstream nats-io/terraform-provider-jetstream
- License
- Notes
- This Pulumi package is based on the
jetstream
Terraform Provider.