Ejemplo n.º 1
0
func (c *conn) fetchRequest() (fr *store.FetchRequest) {
	if c.LastIDSent > 0 {
		fr = store.NewFetchRequest(
			protocol.Path(*c.config.SMSTopic).Partition(),
			c.LastIDSent+1,
			0,
			store.DirectionForward, -1)
	}
	return
}
Ejemplo n.º 2
0
func (sd *SubscriberData) newRoute() *router.Route {
	var fr *store.FetchRequest
	if sd.LastID > 0 {
		fr = store.NewFetchRequest(sd.Topic.Partition(), sd.LastID, 0, store.DirectionForward, -1)
	}
	return router.NewRoute(router.RouteConfig{
		Path:         sd.Topic,
		RouteParams:  sd.Params,
		FetchRequest: fr,
	})
}