The gcp:healthcare/hl7Store:Hl7Store resource, part of the Pulumi GCP provider, defines an HL7v2 message store within a Healthcare dataset. This guide focuses on three capabilities: Pub/Sub notification configuration, custom schema validation, and unschematized message acceptance.
HL7v2 stores belong to Healthcare datasets and may publish message events to Pub/Sub topics. The examples are intentionally small. Combine them with your own dataset infrastructure and IAM policies.
Create a store with Pub/Sub notifications
Healthcare systems often need to notify downstream applications when new HL7v2 messages arrive, enabling real-time event processing without polling.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const topic = new gcp.pubsub.Topic("topic", {name: "hl7-v2-notifications"});
const dataset = new gcp.healthcare.Dataset("dataset", {
name: "example-dataset",
location: "us-central1",
});
const store = new gcp.healthcare.Hl7Store("store", {
name: "example-hl7-v2-store",
dataset: dataset.id,
rejectDuplicateMessage: true,
notificationConfigs: [{
pubsubTopic: topic.id,
}],
labels: {
label1: "labelvalue1",
},
});
import pulumi
import pulumi_gcp as gcp
topic = gcp.pubsub.Topic("topic", name="hl7-v2-notifications")
dataset = gcp.healthcare.Dataset("dataset",
name="example-dataset",
location="us-central1")
store = gcp.healthcare.Hl7Store("store",
name="example-hl7-v2-store",
dataset=dataset.id,
reject_duplicate_message=True,
notification_configs=[{
"pubsub_topic": topic.id,
}],
labels={
"label1": "labelvalue1",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/healthcare"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/pubsub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
topic, err := pubsub.NewTopic(ctx, "topic", &pubsub.TopicArgs{
Name: pulumi.String("hl7-v2-notifications"),
})
if err != nil {
return err
}
dataset, err := healthcare.NewDataset(ctx, "dataset", &healthcare.DatasetArgs{
Name: pulumi.String("example-dataset"),
Location: pulumi.String("us-central1"),
})
if err != nil {
return err
}
_, err = healthcare.NewHl7Store(ctx, "store", &healthcare.Hl7StoreArgs{
Name: pulumi.String("example-hl7-v2-store"),
Dataset: dataset.ID(),
RejectDuplicateMessage: pulumi.Bool(true),
NotificationConfigs: healthcare.Hl7StoreNotificationConfigsArray{
&healthcare.Hl7StoreNotificationConfigsArgs{
PubsubTopic: topic.ID(),
},
},
Labels: pulumi.StringMap{
"label1": pulumi.String("labelvalue1"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var topic = new Gcp.PubSub.Topic("topic", new()
{
Name = "hl7-v2-notifications",
});
var dataset = new Gcp.Healthcare.Dataset("dataset", new()
{
Name = "example-dataset",
Location = "us-central1",
});
var store = new Gcp.Healthcare.Hl7Store("store", new()
{
Name = "example-hl7-v2-store",
Dataset = dataset.Id,
RejectDuplicateMessage = true,
NotificationConfigs = new[]
{
new Gcp.Healthcare.Inputs.Hl7StoreNotificationConfigsArgs
{
PubsubTopic = topic.Id,
},
},
Labels =
{
{ "label1", "labelvalue1" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.healthcare.Dataset;
import com.pulumi.gcp.healthcare.DatasetArgs;
import com.pulumi.gcp.healthcare.Hl7Store;
import com.pulumi.gcp.healthcare.Hl7StoreArgs;
import com.pulumi.gcp.healthcare.inputs.Hl7StoreNotificationConfigsArgs;
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 topic = new Topic("topic", TopicArgs.builder()
.name("hl7-v2-notifications")
.build());
var dataset = new Dataset("dataset", DatasetArgs.builder()
.name("example-dataset")
.location("us-central1")
.build());
var store = new Hl7Store("store", Hl7StoreArgs.builder()
.name("example-hl7-v2-store")
.dataset(dataset.id())
.rejectDuplicateMessage(true)
.notificationConfigs(Hl7StoreNotificationConfigsArgs.builder()
.pubsubTopic(topic.id())
.build())
.labels(Map.of("label1", "labelvalue1"))
.build());
}
}
resources:
store:
type: gcp:healthcare:Hl7Store
properties:
name: example-hl7-v2-store
dataset: ${dataset.id}
rejectDuplicateMessage: true
notificationConfigs:
- pubsubTopic: ${topic.id}
labels:
label1: labelvalue1
topic:
type: gcp:pubsub:Topic
properties:
name: hl7-v2-notifications
dataset:
type: gcp:healthcare:Dataset
properties:
name: example-dataset
location: us-central1
When messages are ingested or created, the store publishes notifications to the specified Pub/Sub topic. The notificationConfigs property accepts a list of notification destinations; each receives the message name (not the full message content). The rejectDuplicateMessage property controls whether the store accepts messages with duplicate IDs.
Validate messages against a custom HL7v2 schema
Organizations with custom message structures need schema validation to ensure incoming messages conform to their specific segment definitions and cardinality rules.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const dataset = new gcp.healthcare.Dataset("dataset", {
name: "example-dataset",
location: "us-central1",
});
const store = new gcp.healthcare.Hl7Store("store", {
name: "example-hl7-v2-store",
dataset: dataset.id,
parserConfig: {
allowNullHeader: false,
segmentTerminator: "Jw==",
schema: `{
\\"schemas\\": [{
\\"messageSchemaConfigs\\": {
\\"ADT_A01\\": {
\\"name\\": \\"ADT_A01\\",
\\"minOccurs\\": 1,
\\"maxOccurs\\": 1,
\\"members\\": [{
\\"segment\\": {
\\"type\\": \\"MSH\\",
\\"minOccurs\\": 1,
\\"maxOccurs\\": 1
}
},
{
\\"segment\\": {
\\"type\\": \\"EVN\\",
\\"minOccurs\\": 1,
\\"maxOccurs\\": 1
}
},
{
\\"segment\\": {
\\"type\\": \\"PID\\",
\\"minOccurs\\": 1,
\\"maxOccurs\\": 1
}
},
{
\\"segment\\": {
\\"type\\": \\"ZPD\\",
\\"minOccurs\\": 1,
\\"maxOccurs\\": 1
}
},
{
\\"segment\\": {
\\"type\\": \\"OBX\\"
}
},
{
\\"group\\": {
\\"name\\": \\"PROCEDURE\\",
\\"members\\": [{
\\"segment\\": {
\\"type\\": \\"PR1\\",
\\"minOccurs\\": 1,
\\"maxOccurs\\": 1
}
},
{
\\"segment\\": {
\\"type\\": \\"ROL\\"
}
}
]
}
},
{
\\"segment\\": {
\\"type\\": \\"PDA\\",
\\"maxOccurs\\": 1
}
}
]
}
}
}],
\\"types\\": [{
\\"type\\": [{
\\"name\\": \\"ZPD\\",
\\"primitive\\": \\"VARIES\\"
}
]
}],
\\"ignoreMinOccurs\\": true
}
`,
},
});
import pulumi
import pulumi_gcp as gcp
dataset = gcp.healthcare.Dataset("dataset",
name="example-dataset",
location="us-central1")
store = gcp.healthcare.Hl7Store("store",
name="example-hl7-v2-store",
dataset=dataset.id,
parser_config={
"allow_null_header": False,
"segment_terminator": "Jw==",
"schema": """{
\"schemas\": [{
\"messageSchemaConfigs\": {
\"ADT_A01\": {
\"name\": \"ADT_A01\",
\"minOccurs\": 1,
\"maxOccurs\": 1,
\"members\": [{
\"segment\": {
\"type\": \"MSH\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"EVN\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"PID\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"ZPD\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"OBX\"
}
},
{
\"group\": {
\"name\": \"PROCEDURE\",
\"members\": [{
\"segment\": {
\"type\": \"PR1\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"ROL\"
}
}
]
}
},
{
\"segment\": {
\"type\": \"PDA\",
\"maxOccurs\": 1
}
}
]
}
}
}],
\"types\": [{
\"type\": [{
\"name\": \"ZPD\",
\"primitive\": \"VARIES\"
}
]
}],
\"ignoreMinOccurs\": true
}
""",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/healthcare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
dataset, err := healthcare.NewDataset(ctx, "dataset", &healthcare.DatasetArgs{
Name: pulumi.String("example-dataset"),
Location: pulumi.String("us-central1"),
})
if err != nil {
return err
}
_, err = healthcare.NewHl7Store(ctx, "store", &healthcare.Hl7StoreArgs{
Name: pulumi.String("example-hl7-v2-store"),
Dataset: dataset.ID(),
ParserConfig: &healthcare.Hl7StoreParserConfigArgs{
AllowNullHeader: pulumi.Bool(false),
SegmentTerminator: pulumi.String("Jw=="),
Schema: pulumi.String(`{
\"schemas\": [{
\"messageSchemaConfigs\": {
\"ADT_A01\": {
\"name\": \"ADT_A01\",
\"minOccurs\": 1,
\"maxOccurs\": 1,
\"members\": [{
\"segment\": {
\"type\": \"MSH\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"EVN\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"PID\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"ZPD\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"OBX\"
}
},
{
\"group\": {
\"name\": \"PROCEDURE\",
\"members\": [{
\"segment\": {
\"type\": \"PR1\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"ROL\"
}
}
]
}
},
{
\"segment\": {
\"type\": \"PDA\",
\"maxOccurs\": 1
}
}
]
}
}
}],
\"types\": [{
\"type\": [{
\"name\": \"ZPD\",
\"primitive\": \"VARIES\"
}
]
}],
\"ignoreMinOccurs\": true
}
`),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var dataset = new Gcp.Healthcare.Dataset("dataset", new()
{
Name = "example-dataset",
Location = "us-central1",
});
var store = new Gcp.Healthcare.Hl7Store("store", new()
{
Name = "example-hl7-v2-store",
Dataset = dataset.Id,
ParserConfig = new Gcp.Healthcare.Inputs.Hl7StoreParserConfigArgs
{
AllowNullHeader = false,
SegmentTerminator = "Jw==",
Schema = @"{
\""schemas\"": [{
\""messageSchemaConfigs\"": {
\""ADT_A01\"": {
\""name\"": \""ADT_A01\"",
\""minOccurs\"": 1,
\""maxOccurs\"": 1,
\""members\"": [{
\""segment\"": {
\""type\"": \""MSH\"",
\""minOccurs\"": 1,
\""maxOccurs\"": 1
}
},
{
\""segment\"": {
\""type\"": \""EVN\"",
\""minOccurs\"": 1,
\""maxOccurs\"": 1
}
},
{
\""segment\"": {
\""type\"": \""PID\"",
\""minOccurs\"": 1,
\""maxOccurs\"": 1
}
},
{
\""segment\"": {
\""type\"": \""ZPD\"",
\""minOccurs\"": 1,
\""maxOccurs\"": 1
}
},
{
\""segment\"": {
\""type\"": \""OBX\""
}
},
{
\""group\"": {
\""name\"": \""PROCEDURE\"",
\""members\"": [{
\""segment\"": {
\""type\"": \""PR1\"",
\""minOccurs\"": 1,
\""maxOccurs\"": 1
}
},
{
\""segment\"": {
\""type\"": \""ROL\""
}
}
]
}
},
{
\""segment\"": {
\""type\"": \""PDA\"",
\""maxOccurs\"": 1
}
}
]
}
}
}],
\""types\"": [{
\""type\"": [{
\""name\"": \""ZPD\"",
\""primitive\"": \""VARIES\""
}
]
}],
\""ignoreMinOccurs\"": true
}
",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.healthcare.Dataset;
import com.pulumi.gcp.healthcare.DatasetArgs;
import com.pulumi.gcp.healthcare.Hl7Store;
import com.pulumi.gcp.healthcare.Hl7StoreArgs;
import com.pulumi.gcp.healthcare.inputs.Hl7StoreParserConfigArgs;
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 dataset = new Dataset("dataset", DatasetArgs.builder()
.name("example-dataset")
.location("us-central1")
.build());
var store = new Hl7Store("store", Hl7StoreArgs.builder()
.name("example-hl7-v2-store")
.dataset(dataset.id())
.parserConfig(Hl7StoreParserConfigArgs.builder()
.allowNullHeader(false)
.segmentTerminator("Jw==")
.schema("""
{
\"schemas\": [{
\"messageSchemaConfigs\": {
\"ADT_A01\": {
\"name\": \"ADT_A01\",
\"minOccurs\": 1,
\"maxOccurs\": 1,
\"members\": [{
\"segment\": {
\"type\": \"MSH\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"EVN\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"PID\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"ZPD\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"OBX\"
}
},
{
\"group\": {
\"name\": \"PROCEDURE\",
\"members\": [{
\"segment\": {
\"type\": \"PR1\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"ROL\"
}
}
]
}
},
{
\"segment\": {
\"type\": \"PDA\",
\"maxOccurs\": 1
}
}
]
}
}
}],
\"types\": [{
\"type\": [{
\"name\": \"ZPD\",
\"primitive\": \"VARIES\"
}
]
}],
\"ignoreMinOccurs\": true
}
""")
.build())
.build());
}
}
resources:
store:
type: gcp:healthcare:Hl7Store
properties:
name: example-hl7-v2-store
dataset: ${dataset.id}
parserConfig:
allowNullHeader: false
segmentTerminator: Jw==
schema: |
{
\"schemas\": [{
\"messageSchemaConfigs\": {
\"ADT_A01\": {
\"name\": \"ADT_A01\",
\"minOccurs\": 1,
\"maxOccurs\": 1,
\"members\": [{
\"segment\": {
\"type\": \"MSH\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"EVN\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"PID\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"ZPD\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"OBX\"
}
},
{
\"group\": {
\"name\": \"PROCEDURE\",
\"members\": [{
\"segment\": {
\"type\": \"PR1\",
\"minOccurs\": 1,
\"maxOccurs\": 1
}
},
{
\"segment\": {
\"type\": \"ROL\"
}
}
]
}
},
{
\"segment\": {
\"type\": \"PDA\",
\"maxOccurs\": 1
}
}
]
}
}
}],
\"types\": [{
\"type\": [{
\"name\": \"ZPD\",
\"primitive\": \"VARIES\"
}
]
}],
\"ignoreMinOccurs\": true
}
dataset:
type: gcp:healthcare:Dataset
properties:
name: example-dataset
location: us-central1
The parserConfig property defines how the store interprets HL7v2 messages. The schema property contains a JSON structure that specifies message types (like ADT_A01), their required segments (MSH, EVN, PID), and cardinality constraints (minOccurs, maxOccurs). The segmentTerminator is base64-encoded; allowNullHeader controls whether messages without MSH segments are accepted.
Accept messages without schema validation
Some workflows need to store HL7v2 messages without enforcing strict schema validation, allowing flexibility for varied message formats or migration scenarios.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const dataset = new gcp.healthcare.Dataset("dataset", {
name: "example-dataset",
location: "us-central1",
});
const store = new gcp.healthcare.Hl7Store("store", {
name: "example-hl7-v2-store",
dataset: dataset.id,
parserConfig: {
allowNullHeader: false,
segmentTerminator: "Jw==",
version: "V2",
},
});
import pulumi
import pulumi_gcp as gcp
dataset = gcp.healthcare.Dataset("dataset",
name="example-dataset",
location="us-central1")
store = gcp.healthcare.Hl7Store("store",
name="example-hl7-v2-store",
dataset=dataset.id,
parser_config={
"allow_null_header": False,
"segment_terminator": "Jw==",
"version": "V2",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/healthcare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
dataset, err := healthcare.NewDataset(ctx, "dataset", &healthcare.DatasetArgs{
Name: pulumi.String("example-dataset"),
Location: pulumi.String("us-central1"),
})
if err != nil {
return err
}
_, err = healthcare.NewHl7Store(ctx, "store", &healthcare.Hl7StoreArgs{
Name: pulumi.String("example-hl7-v2-store"),
Dataset: dataset.ID(),
ParserConfig: &healthcare.Hl7StoreParserConfigArgs{
AllowNullHeader: pulumi.Bool(false),
SegmentTerminator: pulumi.String("Jw=="),
Version: pulumi.String("V2"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var dataset = new Gcp.Healthcare.Dataset("dataset", new()
{
Name = "example-dataset",
Location = "us-central1",
});
var store = new Gcp.Healthcare.Hl7Store("store", new()
{
Name = "example-hl7-v2-store",
Dataset = dataset.Id,
ParserConfig = new Gcp.Healthcare.Inputs.Hl7StoreParserConfigArgs
{
AllowNullHeader = false,
SegmentTerminator = "Jw==",
Version = "V2",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.healthcare.Dataset;
import com.pulumi.gcp.healthcare.DatasetArgs;
import com.pulumi.gcp.healthcare.Hl7Store;
import com.pulumi.gcp.healthcare.Hl7StoreArgs;
import com.pulumi.gcp.healthcare.inputs.Hl7StoreParserConfigArgs;
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 dataset = new Dataset("dataset", DatasetArgs.builder()
.name("example-dataset")
.location("us-central1")
.build());
var store = new Hl7Store("store", Hl7StoreArgs.builder()
.name("example-hl7-v2-store")
.dataset(dataset.id())
.parserConfig(Hl7StoreParserConfigArgs.builder()
.allowNullHeader(false)
.segmentTerminator("Jw==")
.version("V2")
.build())
.build());
}
}
resources:
store:
type: gcp:healthcare:Hl7Store
properties:
name: example-hl7-v2-store
dataset: ${dataset.id}
parserConfig:
allowNullHeader: false
segmentTerminator: Jw==
version: V2
dataset:
type: gcp:healthcare:Dataset
properties:
name: example-dataset
location: us-central1
This configuration uses parserConfig without a schema property, accepting messages that conform to the specified HL7v2 version (V2) without custom validation rules. This approach simplifies ingestion when message structures vary or when migrating from systems with inconsistent formats.
Beyond these examples
These snippets focus on specific HL7v2 store features: Pub/Sub notification integration and schema-based and unschematized message parsing. They’re intentionally minimal rather than full healthcare data pipelines.
The examples reference pre-existing infrastructure such as Healthcare datasets (the parent resource) and Pub/Sub topics for notifications. They focus on configuring the store rather than provisioning the surrounding healthcare infrastructure.
To keep things focused, common HL7v2 store patterns are omitted, including:
- Message filtering in notification configs
- IAM permissions for store access
- Message retention and lifecycle policies
- Integration with FHIR or DICOM stores
These omissions are intentional: the goal is to illustrate how each store feature is wired, not provide drop-in healthcare data modules. See the HL7v2 Store resource reference for all available configuration options.
Let's create GCP Healthcare HL7v2 Stores
Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.
Try Pulumi Cloud for FREEFrequently Asked Questions
Configuration & Immutability
name property may recreate the HL7v2 store, removing all data. Plan naming carefully during initial deployment to avoid data loss.dataset and name are immutable. The name property is particularly critical because changing it may trigger store recreation and data loss.dataset (in format ‘projects/{project}/locations/{location}/datasets/{dataset}’), name, and parserConfig. The dataset must already exist.Notifications
notificationConfigs with a Pub/Sub topic. Each configuration can use filters to determine when to publish notifications for Ingest and Create events.notificationConfigs (plural). The singular notificationConfig is deprecated and will be removed in a future major release.Labels & Metadata
labels field is non-authoritative and only manages labels in your configuration. Use effectiveLabels to see all labels on the resource, including those set by other clients or services.Parser Configuration
schema, allowNullHeader, and segmentTerminator) for structured parsing, or a version-based approach (with version: "V2") for unschematized parsing.rejectDuplicateMessage to true to reject duplicate messages.