Use the -e option:
rsync -avz -e "ssh -p $portNumber" user@remoteip:/path/to/files/ /local/path/
Use the -e option:
rsync -avz -e "ssh -p $portNumber" user@remoteip:/path/to/files/ /local/path/
https://bugzilla.redhat.com/show_bug.cgi?id=809367