+1, And I also like Dilini's idea of using the transport properties, So for the behaviour you mentioned, add the trp:file.name property to inform the user what file is currently being read. This will be very useful for non-file tailing scenarios.
On Sat, Jul 1, 2017 at 3:12 PM, Minudika Malshan <[email protected]> wrote: > Hi, > > For the initial implementation, we have decided to implement it as below, > When tailing is enabled, > > - A single file can be pointed out using the uri and it will be > consumed and tailed. > > > - If the uri points out a directory, the first file (when files are > sorted in alphabetical ascending order) will be consumed and tailed. > > Thanks and regards! > > On Thu, Jun 29, 2017 at 12:05 PM, Dilini Muthumala <[email protected]> > wrote: > >> Hi, >> >> If the user wants to find out which file the event came from (if there is >> a use case as such), then he can create separate sources for each file. >> >> Some problems with above approach would be: >> - if the user does not know the file names before hand, above is not a >> solution >> - when there are many files, user will have to create many streams >> >> Another option I can think of is introducing a transport property to >> contain the file name; something like *trp:file-name.* >> >> IMO, introducing a transport property would be better if we really have >> this use case that user wants to know which the event came from. >> >> Thank you, >> Dilini >> >> >> On Thu, Jun 29, 2017 at 11:44 AM, Minudika Malshan <[email protected]> >> wrote: >> >>> Hi all, >>> >>> In proposed Sindhi-io-file : source, the user will be providing a uri >>> of a directory mentioning that tailing enabled or not. >>> If tailing is enabled, all the files will be consumed and the connection >>> will be kept alive in order to check whether a new record added to the file >>> later. >>> >>> In this case, files in the directory will have to be consumed in >>> parallel and events will be created for each added record accordingly. >>> Issue is, will it be OK to create events without a way for the user to know >>> what file is related to that event? >>> >>> Thanks and regards! >>> -- >>> *Minudika Gammanpila* >>> Software Engineer - WSO2 >>> >>> Email : [email protected] >>> Mobile : +94715659887 <+94%2071%20565%209887> >>> Web : http://wso2.com <http://wso2.com/signature> >>> >> >> >> >> -- >> *Dilini Muthumala* >> Senior Software Engineer, >> WSO2 Inc. >> >> *E-mail :* [email protected] >> *Mobile: *+94 713-400-029 <+94%2071%20340%200029> >> > > > > -- > *Minudika Gammanpila* > Software Engineer - WSO2 > > Email : [email protected] > Mobile : +94715659887 <071%20565%209887> > Web : http://wso2.com <http://wso2.com/signature> > -- *S. Suhothayan* Associate Director / Architect *WSO2 Inc. *http://wso2.com * <http://wso2.com/>* lean . enterprise . middleware *cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/>twitter: http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in: http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
