func (s *ActionSubscription) WaitForReady() {
	s.subscription.WaitForReady()
}
WaitForReady will block until the subscription is ack
package action
import (
	"context"
	"encoding/json"
	"fmt"
	"sync"
	"github.com/pinpt/go-common/v10/datamodel"
	"github.com/pinpt/go-common/v10/event"
	"github.com/pinpt/go-common/v10/eventing"
)
type ModelFactory interface {
	New(name datamodel.ModelNameType) datamodel.Model
}
type Config struct {
	Topic string
	Factory ModelFactory
	event.Subscription
}
type Action interface {
	Execute(event datamodel.ModelReceiveEvent) (datamodel.ModelSendEvent, error)
}
type ActionFunc func(instance datamodel.ModelReceiveEvent) (datamodel.ModelSendEvent, error)
type action struct {
	callback ActionFunc
}
func (a *action) Execute(instance datamodel.ModelReceiveEvent) (datamodel.ModelSendEvent, error) {
	return a.callback(instance)
}
func NewAction(callback ActionFunc) Action {
	return &action{callback}
}
type ActionSubscription struct {
	ctx          context.Context
	action       Action
	subscription *event.SubscriptionChannel
	config       Config
	mu           sync.Mutex
}