RegisterNamespace throws an error Invalid RetentionDays when my retention in days is > 30 (java sdk)

Hi,

RegisterNamespace throws an error saying “Invalid RetentionDays” when my retention in days is > 30
I am using below code to register namespace

WorkflowServiceStubs service = WorkflowServiceStubs.newInstance(WorkflowServiceStubsOptions.newBuilder()
                    .setTarget(temporalServerAddress).build());
            RegisterNamespaceRequest request =
                    RegisterNamespaceRequest.newBuilder()
                            .setNamespace(namespace)
                            .setWorkflowExecutionRetentionPeriod(Durations.fromDays(31))
                            .build();
            RegisterNamespaceResponse response = service.blockingStub().registerNamespace(request);    

Currently the max retention days allowed by the server is 30 days.

can we increase that in some way by any temporal-server docker setting or any other way??

This is defined as a constant. The only way to change that is to update the constant and rebuild your own binary.
If you need higher retention, I would recommend to look into setting up Archival.