Skip to content

Commit e04553a

Browse files
committed
fix stream name when acror name contains a dot
1 parent f60d0ee commit e04553a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/actors/actor/entity/invocation.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,9 @@ defmodule Actors.Actor.Entity.Invocation do
597597

598598
defp do_handle_projection(id, action, %{sourceable: true} = _settings, _state, response) do
599599
stream_name = StreamInitiator.stream_name(id)
600+
id_name = String.replace(id.name, ".", "-")
600601

601-
subject = "actors.#{stream_name}.#{id.name}.#{action}"
602+
subject = "actors.#{stream_name}.#{id_name}.#{action}"
602603
payload = Google.Protobuf.Any.encode(response.updated_context.state)
603604

604605
uuid = UUID.uuid4(:hex)

lib/actors/actor/entity/lifecycle/stream_initiator.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,6 @@ defmodule Actors.Actor.Entity.Lifecycle.StreamInitiator do
264264
do: actor_id.name,
265265
else: actor_id.parent
266266

267-
"#{actor_id.system}-#{actor_name}"
267+
String.replace("#{actor_id.system}-#{actor_name}", ".", "-")
268268
end
269269
end

0 commit comments

Comments
 (0)