i have added this in my action proto but not able to compile
rpc Init (google.protobuf.Empty) returns (google.protobuf.Empty) {
option (kalix.method).trigger = {
on: STARTUP,
max_retries: 3
};
}
i am getting below error
Option "(kalix.method).trigger" unknown. Ensure that your proto definition file imports the proto which defines the option
i already have these import
import "kalix/annotations.proto";
import "google/api/annotations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
i am using <kalix-sdk.version>1.3.5</kalix-sdk.version> this version of kalix
Hi,
That option was introduced with jvm sdk 1.3.6
but you can already bump to 1.3.8
. That will solve it.
@efgpinto Thanks it worked .
But after server start i am not getting control to init block is anu thing i am missing
@Override
public Effect<Empty> init(Empty empty) {
System.out.println("mmmmmmmmmmmmmmmmmm");
return effect from another call
}
In theory, you should be seeing that message on the output.
Just to make sure, I would probably try with using a logger or just throwing an exception from that method (which should trigger a retry and you will be able to see the exception logged).
If you want to confirm, I just created this very small sample with only the trigger that you can use to compare if you have any misconfiguration.
@efgpinto thanks i have matched my solution with yours its exactly same but still i dont see logger .i have implemented this hook in one of the action class.
Please check your docker-compose file and make sure you’re using 1.1.29
as the proxy/runtime image.
Thanks it worked with 1.1.29.
1 Like