book
Article ID: KB0076898
calendar_today
Updated On:
Description
When submitting a second query into the LiveView Query Input adapter the query is not submitted and we see this error in the console output:
2019-10-23 19:42:06.466000+0530 [17972:Main module default] WARN com.streambase.sb.adapter.liveview.LiveViewQuery:
InputAdapter: QueryID GetID is already in use, ignoring new query
How can we avoid this error?
Resolution
In the EventFlow before the LiveVIew Query Input adapter, add a Sequence Operator and append its value to the tuple "QueryName" field so that each new query is uniquely identified.
The reason this warning appears is because most queries are CONTINUOUS, so the LV Query adapter has already registered this query and will be emitting tuples until it is unregistered..
If the query is supposed to be a SNAPSHOT, set "SnapshotOnly=true" in the query command tuple. Note that without this setting (a continuous query), but submitting the same query with a unique QueryName, would result in multiple identical continuous queries. The adapter would emit duplicate output satisfying each individual query. To replace a continuous query, before submitting the new query, use the "Unregister=true" option with the old "QueryName" value to remove the prior continuous query.