func NewMessageService(name string, handle MessageHandle) (*MessageService, error) {
	if name == "" || handle == nil {
		return nil, fmt.Errorf(errNameAndHandleMandatory)
	}
	return &MessageService{
		name:   name,
		handle: handle,
	}, nil
}
NewMessageService creates basic message service which serves
incoming basic messages [RFC-0095]


Args:

name - is name of this message service (this is mandatory argument).

handle - is handle function to which incoming basic message will be sent(this is mandatory argument).

Returns:

MessageService: basic message service,

error: arg validation errors.
package basic
import (
	"fmt"
	"github.com/hyperledger/aries-framework-go/pkg/common/log"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/common/service"
	"github.com/hyperledger/aries-framework-go/pkg/internal/logutil"
)
const (
	MessageRequestType = "https://didcomm.org/basicmessage/1.0/message"
	errNameAndHandleMandatory = "service name and basic message handle is mandatory"
	errFailedToDecodeMsg      = "unable to decode incoming DID comm message: %w"
	basicMessage = "basicMessage"
)
var logger = log.New("aries-framework/basicmsg")
type MessageHandle func(message Message, ctx service.DIDCommContext) error