Allow a configurable default queue value on push and index requests#18
Allow a configurable default queue value on push and index requests#18cjohnson78 wants to merge 2 commits intogoogle-cloudsearch:masterfrom
Conversation
requests if they don't already have a value for queue.
| return requestMode == RequestMode.UNSPECIFIED ? this.requestMode.name() : requestMode.name(); | ||
| } | ||
|
|
||
| private String getQueue(String queue) { |
There was a problem hiding this comment.
the method can be static
do we want to check if queue.isEmpty() ?
There was a problem hiding this comment.
added check for queue.isEmpty().
I do not see how this could be static, as it depends on this.defaultQueue
| } | ||
|
|
||
| @Test | ||
| public void testUpdateItemWithDefaultQueue() throws GeneralSecurityException, IOException { |
There was a problem hiding this comment.
nit, just throw Exception for tests (instead of all named individual exception).
There was a problem hiding this comment.
I was just copying existing test cases ; )
|
To be honest it feels redundant with traversers configuration |
|
I do not see how it is redundant with Traverser's configuration. I believe you are referring to the setting that allows you to poll a certain queue? This change is for pushing, not polling. It is necessary to work in conjunction with the other setting. If we install multiple Listing connector in the same datasource (like File System + SharePoint) they currently all push to the "default" queue, regardless of what we configure for polling in the traverser settings. If I missed anything else applicable to pushing to different queues, let me know. |
|
Or maybe you just meant we could use the same setting for both? I can think of at least one example where you might want to push to one queue but poll another queue. It is during development when we want to restrict polling activity. We sometimes change the polling queue to a bogus value so that absolutely no polling occurs, even at startup. |
api.defaultQueue will set a default queue value on push and index requests if they don't already have a value for queue.