Yes, sorry I re-read mail and see that it is not the same issue.
Here is how it is working now:
OrderPolicy cannot have an invalid string as it doesn't allow any string except
this from the OrderPolicy.ENUM: KEY, THREAD and PARTITION.
1. If dispatcher threads is more than 1 you need to set order-policy to one
of this OrderPolicy.ENUM. In case you set any other string you will get:
java.lang.IllegalArgumentException: Failed to convert 'XXX' to type OrderPolicy
for option 'order-policy'
No enum constant org.apache.geode.cache.wan.GatewaySender.OrderPolicy.XXX
2. If dispatcher threads is equal 1 it doesn't need order-policy as it is
alone there(You can set order-policy to some of this values, but they don't
have any impact as it will not be used).
3. If it is lower than 1 you will get exception and message that dispatcher
threads cannot be less than 1.
I guess that you refer to the documentation where is set that default value of
order-policy is key, in that case the correction in documentation is needed or
code change to always use default if it is not specified while creating gateway
sender.
BR,
Mario
Šalje: Alberto Bustamante Reyes
Poslano: 15. siječnja 2020. 18:52
Prima: Mario Kevo ; dev@geode.apache.org
Predmet: RE: GW sender dispatcher threads & order policy
Hi Mario,
My code contains that fix, its not the same issue. GEODE-7561 solves the issue
with the value "1" for dispatcher threads, but an explicit value for
order-policy is still required if you specify a value for dispatcher threads.
BR/
Alberto B.
De: Mario Kevo
Enviado: miércoles, 15 de enero de 2020 18:22
Para: Alberto Bustamante Reyes ;
dev@geode.apache.org
Asunto: Odg: GW sender dispatcher threads & order policy
Hi Alberto,
This is already solved in Geode 1.12.0.
https://issues.apache.org/jira/browse/GEODE-7561
BR,
Mario
Šalje: Alberto Bustamante Reyes
Poslano: 15. siječnja 2020. 18:14
Prima: dev@geode.apache.org
Predmet: GW sender dispatcher threads & order policy
Hi,
I have seen that if I change the default number of dispatcher threads ( 5 )
when creating a gateway sender, I get an error saying I must specify an order
policy:
"Must specify --order-policy when --dispatcher-threads is larger than 1."
I find this odd, taking into account that the default value is already larger
than 1 and order-policy has a default value. Actually, the error is shown if
you specify "--dispatcher-threads=5". I was going to create a ticket to report
this but I have a question: what is the use case for having a sender with less
than 1 dispatcher thread?
Thanks!
BR/
Alberto B.