@@ -6,6 +6,7 @@ through four endpoints. `CompressedEncryptedHandlerWorker` compresses and then
66encrypts Nexus payloads. ` EncryptedHandlerWorker ` encrypts without
77compression. Each handler selects between its own key 1 and key 2 using
88the endpoint in the Nexus context.
9+ The caller and each handler run in separate namespaces.
910
1011| Endpoint | Encryption key | Nexus payload encoding |
1112| ---| ---| ---|
@@ -73,56 +74,66 @@ Keep this prerelease binary separate from your stable CLI. The commands below us
7374
7475## Run locally
7576
76- The caller and both handlers share the ` nexus-serialization ` namespace. Each worker
77- polls its own task queue; both endpoints for a handler target that handler's queue.
77+ The caller and each handler use separate namespaces. Each worker polls a task queue
78+ with the same name as its namespace. Both endpoints for a handler target that handler's
79+ namespace and task queue.
80+
81+ | Worker | Namespace and task queue |
82+ | ---| ---|
83+ | Caller | ` nexus-serialization-caller ` |
84+ | Compressed/encrypted handler | ` nexus-serialization-compressed-encrypted-handler ` |
85+ | Encrypted handler | ` nexus-serialization-encrypted-handler ` |
7886
7987Start the dev server:
8088
8189``` bash
82- ./temporal server start-dev --namespace nexus-serialization
90+ ./temporal server start-dev \
91+ --namespace nexus-serialization-caller \
92+ --namespace nexus-serialization-compressed-encrypted-handler \
93+ --namespace nexus-serialization-encrypted-handler
8394```
8495
8596Create two endpoints for each handler worker:
8697
8798``` bash
8899./temporal operator nexus endpoint create \
89100 --name nexus-serialization-compressed-encrypted-1 \
90- --target-namespace nexus-serialization \
101+ --target-namespace nexus-serialization-compressed-encrypted-handler \
91102 --target-task-queue nexus-serialization-compressed-encrypted-handler
92103./temporal operator nexus endpoint create \
93104 --name nexus-serialization-compressed-encrypted-2 \
94- --target-namespace nexus-serialization \
105+ --target-namespace nexus-serialization-compressed-encrypted-handler \
95106 --target-task-queue nexus-serialization-compressed-encrypted-handler
96107./temporal operator nexus endpoint create \
97108 --name nexus-serialization-encrypted-1 \
98- --target-namespace nexus-serialization \
109+ --target-namespace nexus-serialization-encrypted-handler \
99110 --target-task-queue nexus-serialization-encrypted-handler
100111./temporal operator nexus endpoint create \
101112 --name nexus-serialization-encrypted-2 \
102- --target-namespace nexus-serialization \
113+ --target-namespace nexus-serialization-encrypted-handler \
103114 --target-task-queue nexus-serialization-encrypted-handler
104115```
105116
106117Run each of the following in its own terminal from the repository root:
107118
108119``` bash
109120./gradlew -q :core:execute -PmainClass=io.temporal.samples.nexusserializationcontext.handler.CompressedEncryptedHandlerWorker \
110- --args=" -namespace nexus-serialization"
121+ --args=" -namespace nexus-serialization-compressed-encrypted-handler "
111122```
112123
113124``` bash
114125./gradlew -q :core:execute -PmainClass=io.temporal.samples.nexusserializationcontext.handler.EncryptedHandlerWorker \
115- --args=" -namespace nexus-serialization"
126+ --args=" -namespace nexus-serialization-encrypted-handler "
116127```
117128
118129``` bash
119130./gradlew -q :core:execute -PmainClass=io.temporal.samples.nexusserializationcontext.caller.CallerWorker \
120- --args=" -namespace nexus-serialization"
131+ --args=" -namespace nexus-serialization-caller "
121132```
122133
123134``` bash
124135./gradlew -q :core:execute -PmainClass=io.temporal.samples.nexusserializationcontext.caller.CallerStarter \
125- --args=" -namespace nexus-serialization"
136+ --args=" -namespace nexus-serialization-caller "
126137```
127138
128139The starter prints a sync result and an async result for each endpoint. All eight
0 commit comments