statefun creates unexpected new physical function

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

statefun creates unexpected new physical function

Lian Jiang
Hi,

I am using statefun 2.2.0 and have below routing:

downstream.forward(myFunc.TYPE, myFunc.TYPE.name(), message);

I expect this statement will create only one physical myFunc because the id is hard coded with myFunc.TYPE.name().
This design can use the PersistedValue field in myFunc for all incoming messages. Unfortunately,
I observed multiple physical myFunc objects are created and the PersistedValue field does not work for all incoming messages.
Any idea why this happens? Thanks for any clue. 
Reply | Threaded
Open this post in threaded view
|

Re: statefun creates unexpected new physical function

Lian Jiang
Probolved solved. It is because another function sends messages to myFunc by using non hard coded ids. Thanks.



On Tue, Nov 24, 2020 at 11:24 AM Lian Jiang <[hidden email]> wrote:
Hi,

I am using statefun 2.2.0 and have below routing:

downstream.forward(myFunc.TYPE, myFunc.TYPE.name(), message);

I expect this statement will create only one physical myFunc because the id is hard coded with myFunc.TYPE.name().
This design can use the PersistedValue field in myFunc for all incoming messages. Unfortunately,
I observed multiple physical myFunc objects are created and the PersistedValue field does not work for all incoming messages.
Any idea why this happens? Thanks for any clue. 


--
Reply | Threaded
Open this post in threaded view
|

Re: statefun creates unexpected new physical function

Igal Shilman
Glad to hear that you were able to resolve the issue!

One comment tho: I would really encourage you to upgrade to statefun 2.2.1, which was released recently and it fixes a checkpointing related issue.

Kind regards,
Igal.

On Tue, Nov 24, 2020 at 10:10 PM Lian Jiang <[hidden email]> wrote:
Probolved solved. It is because another function sends messages to myFunc by using non hard coded ids. Thanks.



On Tue, Nov 24, 2020 at 11:24 AM Lian Jiang <[hidden email]> wrote:
Hi,

I am using statefun 2.2.0 and have below routing:

downstream.forward(myFunc.TYPE, myFunc.TYPE.name(), message);

I expect this statement will create only one physical myFunc because the id is hard coded with myFunc.TYPE.name().
This design can use the PersistedValue field in myFunc for all incoming messages. Unfortunately,
I observed multiple physical myFunc objects are created and the PersistedValue field does not work for all incoming messages.
Any idea why this happens? Thanks for any clue. 


--