You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `customer_domain.proto` contains all the internal data objects (https://docs.kalix.io/reference/glossary.html#entity[Entities, window="new"]). The https://docs.kalix.io/reference/glossary.html#value_entity[Value Entity, window="new"] in this quickstart is a Key/Value store that stores only the latest updates.
121
120
122
-
123
121
. Create a `customer_domain.proto` file and save it in the `src/main/proto/customer/domain` directory.
124
122
125
123
. Add declarations for the proto syntax and domain package.
* The incoming message contains the request data from your client and the command handler updates the state of the customer.
165
-
* The `convertToDomain` and `convertAddressToDomain` methods convert the incoming request to your domain model.
164
+
* The `convertToDomain` methods convert the incoming request to your domain model.
166
165
167
166
. Modify the `getCustomer` method as follows to handle the `GetCustomerRequest` command:
168
167
+
@@ -188,18 +187,21 @@ To build and publish the container image and then deploy the service, follow the
188
187
189
188
. If you haven't done so yet, sign in to your Kalix account. If this is your first time using Kalix, this will let you register an account, https://docs.kalix.io/projects/create-project.html[create your first project], and set this project as the default.
190
189
+
190
+
[source,command line]
191
191
----
192
192
kalix auth login
193
193
----
194
194
195
195
. Use the `deploy` target to build the container image, publish it to the container registry as configured in the `pom.xml` file, and then automatically https://docs.kalix.io/services/deploy-service.html#_deploy[deploy the service] to Kalix using `kalix`:
196
196
+
197
+
[source,command line]
197
198
----
198
199
mvn deploy
199
200
----
200
201
201
202
. You can https://docs.kalix.io/services/deploy-service.html#_verify_service_status[verify the status of the deployed service] using:
202
203
+
204
+
[source,command line]
203
205
----
204
206
kalix service list
205
207
----
@@ -208,6 +210,7 @@ kalix service list
208
210
209
211
Once the service has started successfully, you can https://docs.kalix.io/services/invoke-service.html#_testing_and_development[start a proxy locally] to access the service:
210
212
213
+
[source,command line]
211
214
----
212
215
kalix service proxy <service name> --grpcui
213
216
----
@@ -218,6 +221,7 @@ Or you can use command line gRPC or HTTP clients, such as `grpcurl` or `curl`, t
218
221
219
222
A customer can be created using the `Create` method on `CustomerService`, in the gRPC web UI, or with `grpcurl`:
220
223
224
+
[source,command line]
221
225
----
222
226
grpcurl \
223
227
-d '{
@@ -235,6 +239,7 @@ grpcurl \
235
239
236
240
The `GetCustomer` method can be used to retrieve this customer, in the gRPC web UI, or with `grpcurl`:
237
241
242
+
[source,command line]
238
243
----
239
244
grpcurl \
240
245
-d '{"customer_id": "abc123"}' \
@@ -244,6 +249,7 @@ grpcurl \
244
249
245
250
You can https://docs.kalix.io/services/invoke-service.html#_exposing_services_to_the_internet[expose the service to the internet]. A generated hostname will be returned from the expose command:
The `customer_domain.proto` contains all the internal data objects (https://docs.kalix.io/reference/glossary.html#entity[Entities, window="new"]). The https://docs.kalix.io/reference/glossary.html#value_entity[Value Entity, window="new"] in this quickstart is a Key/Value store that stores only the latest updates.
* The incoming message contains the request data from your client and the command handler updates the state of the customer.
171
-
* The `convertToDomain` and `convertAddressToDomain` methods convert the incoming request to your domain model.
172
+
* The `convertToDomain` methods convert the incoming request to your domain model.
172
173
173
174
. Modify the `getCustomer` method as follows to handle the `GetCustomerRequest` command:
174
175
+
@@ -194,24 +195,28 @@ To build and publish the container image and then deploy the service, follow the
194
195
195
196
. Use the `Docker/publish` task to build the container image and publish it to your container registry. At the end of this command sbt will show you the container image URL you'll need in the next part of this quickstart.
. If you haven't done so yet, sign in to your Kalix account. If this is your first time using Kalix, this will let you register an account, https://docs.kalix.io/projects/create-project.html[create your first project], and set this project as the default.
202
204
+
205
+
[source,command line]
203
206
----
204
207
kalix auth login
205
208
----
206
209
207
210
. https://docs.kalix.io/services/deploy-service.html#_deploy[Deploy the service] with the published container image from above:
208
211
+
212
+
[source,command line]
209
213
----
210
214
kalix service deploy <service name> <container image>
211
215
----
212
216
213
217
. You can https://docs.kalix.io/services/deploy-service.html#_verify_service_status[verify the status of the deployed service] using:
214
218
+
219
+
[source,command line]
215
220
----
216
221
kalix service list
217
222
----
@@ -220,6 +225,7 @@ kalix service list
220
225
221
226
Once the service has started successfully, you can https://docs.kalix.io/services/invoke-service.html#_testing_and_development[start a proxy locally] to access the service:
222
227
228
+
[source,command line]
223
229
----
224
230
kalix service proxy <service name> --grpcui
225
231
----
@@ -230,6 +236,7 @@ Or you can use command line gRPC or HTTP clients, such as `grpcurl` or `curl`, t
230
236
231
237
A customer can be created using the `Create` method on `CustomerService`, in the gRPC web UI, or with `grpcurl`:
232
238
239
+
[source,command line]
233
240
----
234
241
grpcurl \
235
242
-d '{
@@ -247,6 +254,7 @@ grpcurl \
247
254
248
255
The `GetCustomer` method can be used to retrieve this customer, in the gRPC web UI, or with `grpcurl`:
249
256
257
+
[source,command line]
250
258
----
251
259
grpcurl \
252
260
-d '{"customer_id": "abc123"}' \
@@ -256,6 +264,7 @@ grpcurl \
256
264
257
265
You can https://docs.kalix.io/services/invoke-service.html#_exposing_services_to_the_internet[expose the service to the internet]. A generated hostname will be returned from the expose command:
Copy file name to clipboardExpand all lines: samples/scala-eventsourced-counter/src/test/scala/com/example/actions/CounterJournalToTopicActionSpec.scala
0 commit comments